Skip to content

Commit f7acf18

Browse files
authored
chore: prepare-release workflow tweaks (#21833)
1 parent ba0cfb7 commit f7acf18

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/merge-translations.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
required: true
1111
WEBLATE_TOKEN:
1212
required: true
13+
inputs:
14+
skip:
15+
description: 'Skip translations'
16+
required: false
17+
type: boolean
1318

1419
permissions: {}
1520

@@ -25,6 +30,7 @@ jobs:
2530
steps:
2631
- name: Find translation PR
2732
id: find_pr
33+
if: ${{ inputs.skip != true }}
2834
env:
2935
GH_TOKEN: ${{ github.token }}
3036
run: |
@@ -51,18 +57,21 @@ jobs:
5157
5258
- name: Generate a token
5359
id: generate_token
60+
if: ${{ inputs.skip != true }}
5461
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
5562
with:
5663
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
5764
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
5865

5966
- name: Lock weblate
67+
if: ${{ inputs.skip != true }}
6068
env:
6169
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
6270
run: |
6371
curl --fail-with-body -X POST -H "Authorization: Token $WEBLATE_TOKEN" "$WEBLATE_HOST/api/components/$WEBLATE_COMPONENT/lock/" -d lock=true
6472
6573
- name: Commit translations
74+
if: ${{ inputs.skip != true }}
6675
env:
6776
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
6877
run: |
@@ -71,6 +80,7 @@ jobs:
7180
7281
- name: Merge PR
7382
id: merge_pr
83+
if: ${{ inputs.skip != true }}
7484
env:
7585
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
7686
PR_NUMBER: ${{ steps.find_pr.outputs.PR_NUMBER }}
@@ -83,6 +93,7 @@ jobs:
8393
gh pr merge "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --auto --squash
8494
8595
- name: Wait for PR to merge
96+
if: ${{ inputs.skip != true }}
8697
env:
8798
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
8899
PR_NUMBER: ${{ steps.find_pr.outputs.PR_NUMBER }}
@@ -106,7 +117,12 @@ jobs:
106117
exit 1
107118
108119
- name: Unlock weblate
120+
if: ${{ inputs.skip != true }}
109121
env:
110122
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
111123
run: |
112124
curl --fail-with-body -X POST -H "Authorization: Token $WEBLATE_TOKEN" "$WEBLATE_HOST/api/components/$WEBLATE_COMPONENT/lock/" -d lock=false
125+
126+
- name: Report success
127+
run: |
128+
echo "Workflow completed successfully (or was skipped)"

.github/workflows/prepare-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ on:
1010
type: choice
1111
options:
1212
- 'false'
13+
- major
1314
- minor
1415
- patch
1516
mobileBump:
1617
description: 'Bump mobile build number'
1718
required: false
1819
type: boolean
20+
skipTranslations:
21+
description: 'Skip translations'
22+
required: false
23+
type: boolean
1924

2025
concurrency:
2126
group: ${{ github.workflow }}-${{ github.ref }}-root
@@ -26,6 +31,8 @@ permissions: {}
2631
jobs:
2732
merge_translations:
2833
uses: ./.github/workflows/merge-translations.yml
34+
with:
35+
skip: ${{ inputs.skipTranslations }}
2936
permissions:
3037
pull-requests: write
3138
secrets:
@@ -35,6 +42,7 @@ jobs:
3542

3643
bump_version:
3744
runs-on: ubuntu-latest
45+
needs: [merge_translations]
3846
outputs:
3947
ref: ${{ steps.push-tag.outputs.commit_long_sha }}
4048
permissions: {} # No job-level permissions are needed because it uses the app-token

0 commit comments

Comments
 (0)