Repository navigation
71 lines (61 loc) · 2.06 KB
/
Copy pathwithdraw.yml
File metadata and controls
71 lines (61 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Withdraw
# Removes a version from the feed and the plugin manifest, marks the highest stable left as Latest,
# and redeploys. Dispatch it at the newest v* tag, which the release environment requires.
# The GitHub release stays.
on:
workflow_dispatch:
inputs:
version:
description: The version to withdraw, such as 0.82.1 or 0.83.0-beta.2.
required: true
type: string
permissions:
contents: read
jobs:
withdraw:
name: Withdraw
runs-on: macos-latest
environment: release
timeout-minutes: 20
concurrency:
group: gh-pages
queue: max
permissions:
contents: write
env:
VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: gh-pages
path: build/gh-pages
- uses: ./.github/actions/setup-sparkle
- name: Remove the version from the feed and the plugin manifest
env:
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
run: python3 scripts/release/feed.py withdraw "$VERSION" --site build/gh-pages
- name: Push gh-pages
working-directory: build/gh-pages
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add appcast.xml plugins/v3.json
git diff --cached --quiet || { git commit -m "withdraw: v$VERSION" && git push origin HEAD:gh-pages; }
- name: Mark the highest stable as Latest
run: |
set -euo pipefail
latest="$(python3 scripts/release/feed.py latest --site build/gh-pages)"
gh release edit "v$latest" --latest
pages:
name: Pages
needs: withdraw
permissions:
contents: read
pages: write
id-token: write
uses: ./.github/workflows/pages.yml