diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2023-12-21 18:27:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 18:27:00 -0700 |
commit | 6259bb8833a10c1e3dcc84f418946bcf2db40f25 (patch) | |
tree | ceaf71f17493c1f8db4b9d37c9a17b006d5935bc /.github/workflows | |
parent | fix: custom services developer documentation link leads to franz pape (#1493) (diff) | |
download | ferdium-app-6259bb8833a10c1e3dcc84f418946bcf2db40f25.tar.gz ferdium-app-6259bb8833a10c1e3dcc84f418946bcf2db40f25.tar.zst ferdium-app-6259bb8833a10c1e3dcc84f418946bcf2db40f25.zip |
ci: update various github actions to latest (#1494)
- update `actions/checkout` from v3 to v4
- update `actions/setup-node` from v3 to v4
- change `nick-fields/retry` from v2.8.3 to v2
- update `bluwy/release-for-reddit-action` from v1.2.0 to v2
- lock all CI runners to fixed version rather than latest
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/builds.yml | 30 | ||||
-rw-r--r-- | .github/workflows/homebrew-cask-updates.yml | 74 | ||||
-rw-r--r-- | .github/workflows/reddit.yml | 8 | ||||
-rw-r--r-- | .github/workflows/tag-repos.yml | 40 | ||||
-rw-r--r-- | .github/workflows/winget-bucket-update.yml | 25 |
5 files changed, 88 insertions, 89 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 8e5f6c9bf..bb0984368 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml | |||
@@ -40,7 +40,7 @@ jobs: | |||
40 | should_run: ${{ steps.should_run.outputs.should_run }} | 40 | should_run: ${{ steps.should_run.outputs.should_run }} |
41 | steps: | 41 | steps: |
42 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' | 42 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' |
43 | uses: actions/checkout@v3 | 43 | uses: actions/checkout@v4 |
44 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} | 44 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} |
45 | with: | 45 | with: |
46 | ref: nightly | 46 | ref: nightly |
@@ -50,14 +50,14 @@ jobs: | |||
50 | uses: pnpm/action-setup@v2 | 50 | uses: pnpm/action-setup@v2 |
51 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} | 51 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} |
52 | - name: Use Node.js specified in the '.nvmrc' file | 52 | - name: Use Node.js specified in the '.nvmrc' file |
53 | uses: actions/setup-node@v3 | 53 | uses: actions/setup-node@v4 |
54 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} | 54 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} |
55 | with: | 55 | with: |
56 | node-version-file: '.nvmrc' | 56 | node-version-file: '.nvmrc' |
57 | cache: 'pnpm' | 57 | cache: 'pnpm' |
58 | - name: Install node dependencies | 58 | - name: Install node dependencies |
59 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} | 59 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} |
60 | uses: nick-fields/retry@v2.8.3 | 60 | uses: nick-fields/retry@v2 |
61 | with: | 61 | with: |
62 | command: pnpm i | 62 | command: pnpm i |
63 | timeout_minutes: 15 | 63 | timeout_minutes: 15 |
@@ -141,14 +141,14 @@ jobs: | |||
141 | echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV | 141 | echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV |
142 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV | 142 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV |
143 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch | 143 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch |
144 | uses: actions/checkout@v3 | 144 | uses: actions/checkout@v4 |
145 | if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} | 145 | if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} |
146 | with: | 146 | with: |
147 | submodules: recursive | 147 | submodules: recursive |
148 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | 148 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging |
149 | ref: nightly | 149 | ref: nightly |
150 | - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch | 150 | - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch |
151 | uses: actions/checkout@v3 | 151 | uses: actions/checkout@v4 |
152 | if: ${{ github.event_name != 'schedule' && env.MANUAL_REBUILD_ON_NIGHTLY != 'true' }} | 152 | if: ${{ github.event_name != 'schedule' && env.MANUAL_REBUILD_ON_NIGHTLY != 'true' }} |
153 | with: | 153 | with: |
154 | submodules: recursive | 154 | submodules: recursive |
@@ -173,12 +173,12 @@ jobs: | |||
173 | - name: Install pnpm | 173 | - name: Install pnpm |
174 | uses: pnpm/action-setup@v2 | 174 | uses: pnpm/action-setup@v2 |
175 | - name: Use Node.js specified in the '.nvmrc' file | 175 | - name: Use Node.js specified in the '.nvmrc' file |
176 | uses: actions/setup-node@v3 | 176 | uses: actions/setup-node@v4 |
177 | with: | 177 | with: |
178 | node-version-file: '.nvmrc' | 178 | node-version-file: '.nvmrc' |
179 | cache: 'pnpm' | 179 | cache: 'pnpm' |
180 | - name: Install node dependencies | 180 | - name: Install node dependencies |
181 | uses: nick-fields/retry@v2.8.3 | 181 | uses: nick-fields/retry@v2 |
182 | with: | 182 | with: |
183 | command: pnpm i | 183 | command: pnpm i |
184 | timeout_minutes: 15 | 184 | timeout_minutes: 15 |
@@ -220,14 +220,14 @@ jobs: | |||
220 | echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV | 220 | echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV |
221 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV | 221 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV |
222 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch | 222 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch |
223 | uses: actions/checkout@v3 | 223 | uses: actions/checkout@v4 |
224 | if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} | 224 | if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} |
225 | with: | 225 | with: |
226 | submodules: recursive | 226 | submodules: recursive |
227 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | 227 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging |
228 | ref: nightly | 228 | ref: nightly |
229 | - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch | 229 | - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch |
230 | uses: actions/checkout@v3 | 230 | uses: actions/checkout@v4 |
231 | if: ${{ github.event_name != 'schedule' && env.MANUAL_REBUILD_ON_NIGHTLY != 'true' }} | 231 | if: ${{ github.event_name != 'schedule' && env.MANUAL_REBUILD_ON_NIGHTLY != 'true' }} |
232 | with: | 232 | with: |
233 | submodules: recursive | 233 | submodules: recursive |
@@ -252,12 +252,12 @@ jobs: | |||
252 | - name: Install pnpm | 252 | - name: Install pnpm |
253 | uses: pnpm/action-setup@v2 | 253 | uses: pnpm/action-setup@v2 |
254 | - name: Use Node.js specified in the '.nvmrc' file | 254 | - name: Use Node.js specified in the '.nvmrc' file |
255 | uses: actions/setup-node@v3 | 255 | uses: actions/setup-node@v4 |
256 | with: | 256 | with: |
257 | node-version-file: '.nvmrc' | 257 | node-version-file: '.nvmrc' |
258 | cache: 'pnpm' | 258 | cache: 'pnpm' |
259 | - name: Install node dependencies | 259 | - name: Install node dependencies |
260 | uses: nick-fields/retry@v2.8.3 | 260 | uses: nick-fields/retry@v2 |
261 | with: | 261 | with: |
262 | command: pnpm i | 262 | command: pnpm i |
263 | timeout_minutes: 15 | 263 | timeout_minutes: 15 |
@@ -320,14 +320,14 @@ jobs: | |||
320 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV | 320 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV |
321 | shell: bash | 321 | shell: bash |
322 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch | 322 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch |
323 | uses: actions/checkout@v3 | 323 | uses: actions/checkout@v4 |
324 | if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} | 324 | if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} |
325 | with: | 325 | with: |
326 | submodules: recursive | 326 | submodules: recursive |
327 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | 327 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging |
328 | ref: nightly | 328 | ref: nightly |
329 | - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch | 329 | - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch |
330 | uses: actions/checkout@v3 | 330 | uses: actions/checkout@v4 |
331 | if: ${{ github.event_name != 'schedule' && env.MANUAL_REBUILD_ON_NIGHTLY != 'true' }} | 331 | if: ${{ github.event_name != 'schedule' && env.MANUAL_REBUILD_ON_NIGHTLY != 'true' }} |
332 | with: | 332 | with: |
333 | submodules: recursive | 333 | submodules: recursive |
@@ -352,7 +352,7 @@ jobs: | |||
352 | - name: Install pnpm | 352 | - name: Install pnpm |
353 | uses: pnpm/action-setup@v2 | 353 | uses: pnpm/action-setup@v2 |
354 | - name: Use Node.js specified in the '.nvmrc' file | 354 | - name: Use Node.js specified in the '.nvmrc' file |
355 | uses: actions/setup-node@v3 | 355 | uses: actions/setup-node@v4 |
356 | with: | 356 | with: |
357 | node-version-file: '.nvmrc' | 357 | node-version-file: '.nvmrc' |
358 | cache: 'pnpm' | 358 | cache: 'pnpm' |
@@ -365,7 +365,7 @@ jobs: | |||
365 | sed -i 's/\/usr\/bin\/env node/node/g' "$PNPM_BASEDIR/pnpm/bin/pnpm.cjs" | 365 | sed -i 's/\/usr\/bin\/env node/node/g' "$PNPM_BASEDIR/pnpm/bin/pnpm.cjs" |
366 | shell: bash | 366 | shell: bash |
367 | - name: Install node dependencies | 367 | - name: Install node dependencies |
368 | uses: nick-fields/retry@v2.8.3 | 368 | uses: nick-fields/retry@v2 |
369 | with: | 369 | with: |
370 | command: pnpm i | 370 | command: pnpm i |
371 | timeout_minutes: 15 | 371 | timeout_minutes: 15 |
diff --git a/.github/workflows/homebrew-cask-updates.yml b/.github/workflows/homebrew-cask-updates.yml index eaecc0b2c..0d70868dd 100644 --- a/.github/workflows/homebrew-cask-updates.yml +++ b/.github/workflows/homebrew-cask-updates.yml | |||
@@ -8,41 +8,41 @@ on: | |||
8 | 8 | ||
9 | jobs: | 9 | jobs: |
10 | bump-casks: | 10 | bump-casks: |
11 | runs-on: macos-latest | 11 | runs-on: macos-12 |
12 | steps: | 12 | steps: |
13 | - name: Publish nightly | 13 | - name: Publish nightly |
14 | uses: macauley/action-homebrew-bump-cask@v1 | 14 | uses: macauley/action-homebrew-bump-cask@v1 |
15 | if: ${{ contains(github.event.release.tag_name, 'nightly') }} | 15 | if: ${{ contains(github.event.release.tag_name, 'nightly') }} |
16 | with: | 16 | with: |
17 | # Required, custom GitHub access token with only the 'public_repo' scope enabled | 17 | # Required, custom GitHub access token with only the 'public_repo' scope enabled |
18 | token: ${{ secrets.HOMEBREW_FERDIUM_PUBLISH_TOKEN }} | 18 | token: ${{ secrets.HOMEBREW_FERDIUM_PUBLISH_TOKEN }} |
19 | # Bump all outdated casks in this tap | 19 | # Bump all outdated casks in this tap |
20 | tap: ferdium/homebrew-ferdium | 20 | tap: ferdium/homebrew-ferdium |
21 | # Bump only these casks if outdated | 21 | # Bump only these casks if outdated |
22 | cask: ferdium-nightly | 22 | cask: ferdium-nightly |
23 | livecheck: true | 23 | livecheck: true |
24 | dryrun: false | 24 | dryrun: false |
25 | - name: Publish beta | 25 | - name: Publish beta |
26 | uses: macauley/action-homebrew-bump-cask@v1 | 26 | uses: macauley/action-homebrew-bump-cask@v1 |
27 | if: ${{ contains(github.event.release.tag_name, 'beta') }} | 27 | if: ${{ contains(github.event.release.tag_name, 'beta') }} |
28 | with: | 28 | with: |
29 | # Required, custom GitHub access token with only the 'public_repo' scope enabled | 29 | # Required, custom GitHub access token with only the 'public_repo' scope enabled |
30 | token: ${{ secrets.HOMEBREW_FERDIUM_PUBLISH_TOKEN }} | 30 | token: ${{ secrets.HOMEBREW_FERDIUM_PUBLISH_TOKEN }} |
31 | # Bump all outdated casks in this tap | 31 | # Bump all outdated casks in this tap |
32 | tap: ferdium/homebrew-ferdium | 32 | tap: ferdium/homebrew-ferdium |
33 | # Bump only these casks if outdated | 33 | # Bump only these casks if outdated |
34 | cask: ferdium-beta | 34 | cask: ferdium-beta |
35 | livecheck: true | 35 | livecheck: true |
36 | dryrun: false | 36 | dryrun: false |
37 | - name: Publish release | 37 | - name: Publish release |
38 | uses: macauley/action-homebrew-bump-cask@v1 | 38 | uses: macauley/action-homebrew-bump-cask@v1 |
39 | if: ${{ !contains(github.event.release.tag_name, 'nightly') && !contains(github.event.release.tag_name, 'beta') }} | 39 | if: ${{ !contains(github.event.release.tag_name, 'nightly') && !contains(github.event.release.tag_name, 'beta') }} |
40 | with: | 40 | with: |
41 | # Required, custom GitHub access token with only the 'public_repo' scope enabled | 41 | # Required, custom GitHub access token with only the 'public_repo' scope enabled |
42 | token: ${{ secrets.HOMEBREW_FERDIUM_PUBLISH_TOKEN }} | 42 | token: ${{ secrets.HOMEBREW_FERDIUM_PUBLISH_TOKEN }} |
43 | # Bump all outdated casks in this tap | 43 | # Bump all outdated casks in this tap |
44 | tap: ferdium/homebrew-ferdium | 44 | tap: ferdium/homebrew-ferdium |
45 | # Bump only these casks if outdated | 45 | # Bump only these casks if outdated |
46 | cask: ferdium | 46 | cask: ferdium |
47 | livecheck: true | 47 | livecheck: true |
48 | dryrun: false | 48 | dryrun: false |
diff --git a/.github/workflows/reddit.yml b/.github/workflows/reddit.yml index 79149c405..77c771030 100644 --- a/.github/workflows/reddit.yml +++ b/.github/workflows/reddit.yml | |||
@@ -6,17 +6,17 @@ on: | |||
6 | 6 | ||
7 | jobs: | 7 | jobs: |
8 | test: | 8 | test: |
9 | runs-on: ubuntu-latest | 9 | runs-on: ubuntu-22.04 |
10 | steps: | 10 | steps: |
11 | - name: Release for Reddit | 11 | - name: Release for Reddit |
12 | uses: bluwy/release-for-reddit-action@v1.2.0 | 12 | uses: bluwy/release-for-reddit-action@v2 |
13 | with: | 13 | with: |
14 | username: ${{ secrets.REDDIT_USERNAME }} | 14 | username: ${{ secrets.REDDIT_USERNAME }} |
15 | password: ${{ secrets.REDDIT_PASSWORD }} | 15 | password: ${{ secrets.REDDIT_PASSWORD }} |
16 | app-id: ${{ secrets.REDDIT_APP_ID }} | 16 | app-id: ${{ secrets.REDDIT_APP_ID }} |
17 | app-secret: ${{ secrets.REDDIT_APP_SECRET }} | 17 | app-secret: ${{ secrets.REDDIT_APP_SECRET }} |
18 | subreddit: ferdium # Submit to /r/ferdium | 18 | subreddit: ferdium # Submit to /r/ferdium |
19 | title: "[Release] Ferdium ${{ github.event.release.tag_name }}" | 19 | title: '[Release] Ferdium ${{ github.event.release.tag_name }}' |
20 | # flair-id: "7aa4f288-bf0d-11ec-a939-8e36666e1f23" | 20 | # flair-id: "7aa4f288-bf0d-11ec-a939-8e36666e1f23" |
21 | comment: "${{ github.event.release.body }}" | 21 | comment: '${{ github.event.release.body }}' |
22 | notification: true | 22 | notification: true |
diff --git a/.github/workflows/tag-repos.yml b/.github/workflows/tag-repos.yml index 6ef055e7b..0e5de76a5 100644 --- a/.github/workflows/tag-repos.yml +++ b/.github/workflows/tag-repos.yml | |||
@@ -8,27 +8,27 @@ on: | |||
8 | 8 | ||
9 | jobs: | 9 | jobs: |
10 | tag-repos: | 10 | tag-repos: |
11 | runs-on: macos-latest | 11 | runs-on: macos-12 |
12 | steps: | 12 | steps: |
13 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'release' | 13 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'release' |
14 | uses: actions/checkout@v3 | 14 | uses: actions/checkout@v4 |
15 | if: ${{ contains(github.event.release.tag_name, 'nightly') || (github.event_name == 'workflow_dispatch') }} | 15 | if: ${{ contains(github.event.release.tag_name, 'nightly') || (github.event_name == 'workflow_dispatch') }} |
16 | with: | 16 | with: |
17 | ref: nightly | 17 | ref: nightly |
18 | submodules: recursive | 18 | submodules: recursive |
19 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | 19 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging |
20 | - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'release' | 20 | - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'release' |
21 | uses: actions/checkout@v3 | 21 | uses: actions/checkout@v4 |
22 | if: ${{ !contains(github.event.release.tag_name, 'nightly') }} | 22 | if: ${{ !contains(github.event.release.tag_name, 'nightly') }} |
23 | with: | 23 | with: |
24 | ref: release | 24 | ref: release |
25 | submodules: recursive | 25 | submodules: recursive |
26 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | 26 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging |
27 | - name: Extract Git tag name from the currently checked out branch (not from the branch where this run was kicked off) | 27 | - name: Extract Git tag name from the currently checked out branch (not from the branch where this run was kicked off) |
28 | run: | | 28 | run: | |
29 | TAG_NAME=$(node -p 'require("./package.json").version') | 29 | TAG_NAME=$(node -p 'require("./package.json").version') |
30 | echo "TAG_NAME=v$TAG_NAME" >> $GITHUB_ENV | 30 | echo "TAG_NAME=v$TAG_NAME" >> $GITHUB_ENV |
31 | shell: bash | 31 | shell: bash |
32 | # Note: commented out the tagging of the main repo - since that is auto-created when a new release is published | 32 | # Note: commented out the tagging of the main repo - since that is auto-created when a new release is published |
33 | # - name: Tag the main repo | 33 | # - name: Tag the main repo |
34 | # run: | | 34 | # run: | |
diff --git a/.github/workflows/winget-bucket-update.yml b/.github/workflows/winget-bucket-update.yml index 1013a8921..84886b46a 100644 --- a/.github/workflows/winget-bucket-update.yml +++ b/.github/workflows/winget-bucket-update.yml | |||
@@ -9,7 +9,7 @@ on: | |||
9 | workflow_dispatch: | 9 | workflow_dispatch: |
10 | inputs: | 10 | inputs: |
11 | message: | 11 | message: |
12 | description: "Channel to update" | 12 | description: 'Channel to update' |
13 | required: false | 13 | required: false |
14 | release: | 14 | release: |
15 | types: [published] | 15 | types: [published] |
@@ -19,13 +19,13 @@ env: | |||
19 | 19 | ||
20 | jobs: | 20 | jobs: |
21 | manual_winget_update: | 21 | manual_winget_update: |
22 | runs-on: windows-latest | 22 | runs-on: windows-2022 |
23 | name: "Manual winget update: ${{ github.event.inputs.message }}" | 23 | name: 'Manual winget update: ${{ github.event.inputs.message }}' |
24 | if: ${{ github.event_name == 'workflow_dispatch' }} | 24 | if: ${{ github.event_name == 'workflow_dispatch' }} |
25 | steps: | 25 | steps: |
26 | - name: "Install winget" | 26 | - name: 'Install winget' |
27 | # cf https://github.com/actions/virtual-environments/issues/910#issuecomment-1009640391 | 27 | # cf https://github.com/actions/virtual-environments/issues/910#issuecomment-1009640391 |
28 | # TODO: update urls to get more updated version | 28 | # TODO: update urls to get more updated version |
29 | run: | | 29 | run: | |
30 | $ErrorActionPreference = 'Stop' | 30 | $ErrorActionPreference = 'Stop' |
31 | 31 | ||
@@ -35,10 +35,10 @@ jobs: | |||
35 | iwr 'https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml' -Outfile $env:TEMP\winget.license | 35 | iwr 'https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml' -Outfile $env:TEMP\winget.license |
36 | 36 | ||
37 | Add-AppxProvisionedPackage -Online -PackagePath $env:TEMP\winget.msixbundle -LicensePath $env:TEMP\winget.license -DependencyPackagePath @("$env:TEMP\vclibs.appx", "$env:TEMP\vclibsuwp.appx") | 37 | Add-AppxProvisionedPackage -Online -PackagePath $env:TEMP\winget.msixbundle -LicensePath $env:TEMP\winget.license -DependencyPackagePath @("$env:TEMP\vclibs.appx", "$env:TEMP\vclibsuwp.appx") |
38 | - name: "Verify winget" | 38 | - name: 'Verify winget' |
39 | run: | | 39 | run: | |
40 | winget --info | 40 | winget --info |
41 | - name: "Get release tag" | 41 | - name: 'Get release tag' |
42 | run: | | 42 | run: | |
43 | if ("${{ contains(github.event.inputs.message, '[nightly]') }}" -eq $True) { | 43 | if ("${{ contains(github.event.inputs.message, '[nightly]') }}" -eq $True) { |
44 | $preRel = $True | 44 | $preRel = $True |
@@ -64,7 +64,7 @@ jobs: | |||
64 | echo "last_version=$lastVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | 64 | echo "last_version=$lastVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append |
65 | echo "PACKAGE_NAME=$package" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | 65 | echo "PACKAGE_NAME=$package" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append |
66 | 66 | ||
67 | - name: "Verify if version already exist on winget" | 67 | - name: 'Verify if version already exist on winget' |
68 | run: | | 68 | run: | |
69 | $lastVersion = '${{ env.last_version }}' | 69 | $lastVersion = '${{ env.last_version }}' |
70 | $versions = winget show --id '${{ env.PACKAGE_NAME }}' --versions --accept-source-agreements | 70 | $versions = winget show --id '${{ env.PACKAGE_NAME }}' --versions --accept-source-agreements |
@@ -73,7 +73,7 @@ jobs: | |||
73 | echo "version_exists=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | 73 | echo "version_exists=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append |
74 | } | 74 | } |
75 | 75 | ||
76 | - name: "Publish update" | 76 | - name: 'Publish update' |
77 | if: ${{ env.version_exists != 'true' }} | 77 | if: ${{ env.version_exists != 'true' }} |
78 | run: | | 78 | run: | |
79 | $release=Invoke-RestMethod -Uri '${{ env.REPO_URL }}' | 79 | $release=Invoke-RestMethod -Uri '${{ env.REPO_URL }}' |
@@ -95,11 +95,10 @@ jobs: | |||
95 | Write-Host $command | 95 | Write-Host $command |
96 | Invoke-Expression $command | 96 | Invoke-Expression $command |
97 | 97 | ||
98 | |||
99 | winget_release: | 98 | winget_release: |
100 | name: "Update winget after publish: ${{ github.event.inputs.message }}" | 99 | name: 'Update winget after publish: ${{ github.event.inputs.message }}' |
101 | if: ${{ github.event_name == 'release' }} | 100 | if: ${{ github.event_name == 'release' }} |
102 | runs-on: windows-latest | 101 | runs-on: windows-2022 |
103 | steps: | 102 | steps: |
104 | - name: Check release type | 103 | - name: Check release type |
105 | run: | | 104 | run: | |