@@ -18,17 +18,17 @@ jobs:
18
18
name : Setup
19
19
runs-on : ubuntu-24.04
20
20
outputs :
21
- release-version : ${{ steps.version.outputs.version }}
21
+ release_version : ${{ steps.version.outputs.version }}
22
22
steps :
23
23
- name : Checkout repo
24
24
uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
25
25
26
26
- name : Branch check
27
- if : ${{ github.event. inputs.release_type != 'Dry Run' }}
27
+ if : ${{ inputs.release_type != 'Dry Run' }}
28
28
run : |
29
- if [[ "$GITHUB_REF" != "refs/heads/main " ]]; then
29
+ if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc " ]]; then
30
30
echo "==================================="
31
- echo "[!] Can only release from the 'main' branch "
31
+ echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches "
32
32
echo "==================================="
33
33
exit 1
34
34
fi
37
37
id : version
38
38
uses : bitwarden/gh-actions/release-version-check@main
39
39
with :
40
- release-type : ${{ github.event. inputs.release_type }}
40
+ release-type : ${{ inputs.release_type }}
41
41
project-type : ts
42
42
file : package.json
43
43
@@ -47,26 +47,26 @@ jobs:
47
47
needs : setup
48
48
steps :
49
49
- name : Download all artifacts
50
- if : ${{ github.event. inputs.release_type != 'Dry Run' }}
50
+ if : ${{ inputs.release_type != 'Dry Run' }}
51
51
uses : bitwarden/gh-actions/download-artifacts@main
52
52
with :
53
53
workflow : build.yml
54
54
workflow_conclusion : success
55
55
branch : ${{ github.ref_name }}
56
56
57
57
- name : Dry Run - Download all artifacts
58
- if : ${{ github.event. inputs.release_type == 'Dry Run' }}
58
+ if : ${{ inputs.release_type == 'Dry Run' }}
59
59
uses : bitwarden/gh-actions/download-artifacts@main
60
60
with :
61
61
workflow : build.yml
62
62
workflow_conclusion : success
63
63
branch : main
64
64
65
65
- name : Create release
66
- if : ${{ github.event. inputs.release_type != 'Dry Run' }}
66
+ if : ${{ inputs.release_type != 'Dry Run' }}
67
67
uses : ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
68
68
env :
69
- PKG_VERSION : ${{ needs.setup.outputs.release-version }}
69
+ PKG_VERSION : ${{ needs.setup.outputs.release_version }}
70
70
with :
71
71
artifacts : " ./bwdc-windows-${{ env.PKG_VERSION }}.zip,
72
72
./bwdc-macos-${{ env.PKG_VERSION }}.zip,
0 commit comments