Skip to content

Commit 9d69dd2

Browse files
committed
chore: Update release.yml and change asset_name to sesame-daemon-*
1 parent 4e3c6f8 commit 9d69dd2

File tree

1 file changed

+44
-36
lines changed

1 file changed

+44
-36
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,50 @@ jobs:
5454
- name: Checkout
5555
uses: actions/checkout@v4
5656

57+
- name: Set up Git
58+
shell: bash
59+
run: |
60+
git config user.email "github@action.com"
61+
git config user.name "Github Action"
62+
echo ${{ secrets.GITHUB_TOKEN }} > token.txt
63+
git config credential.helper "store --file=token.txt"
64+
65+
- name: Update version
66+
shell: bash
67+
run: |
68+
echo NEW_VERSION=$(yarn version --${{ inputs.version_increment }} --json | jq -r '.data | select(contains("New version")) | split(":")[1] | gsub(" ";"")') >> $GITHUB_ENV
69+
env:
70+
REF: ${{ github.ref }}
71+
72+
- name: Push to unprotected branch
73+
if: inputs.is_branch_protected == 'false'
74+
shell: bash
75+
run: |
76+
git push --follow-tags
77+
env:
78+
REF: ${{ github.ref }}
79+
80+
- name: Push to protected branch
81+
if: inputs.is_branch_protected == 'true'
82+
uses: CasperWA/push-protected@v2
83+
with:
84+
token: ${{ secrets.GITHUB_TOKEN }}
85+
branch: main
86+
unprotect_reviews: true
87+
tags: true
88+
89+
- name: Publish release
90+
uses: ncipollo/release-action@v1
91+
with:
92+
name: Release ${{ env.NEW_VERSION }}
93+
commit: ${{ env.REF }}
94+
draft: false
95+
prerelease: false
96+
generateReleaseNotes: true
97+
token: ${{ secrets.GITHUB_TOKEN }}
98+
makeLatest: ${{ inputs.latest }}
99+
tag: ${{ env.NEW_VERSION }}
100+
57101
- name: Use Node.js
58102
uses: actions/setup-node@v4
59103
with:
@@ -103,42 +147,6 @@ jobs:
103147
arch: 'amd64'
104148
desc: 'Sesame Daemon'
105149

106-
- name: Update version
107-
shell: bash
108-
run: |
109-
echo NEW_VERSION=$(yarn version --${{ inputs.version_increment }} --json | jq -r '.data | select(contains("New version")) | split(":")[1] | gsub(" ";"")') >> $GITHUB_ENV
110-
env:
111-
REF: ${{ github.ref }}
112-
113-
- name: Push to unprotected branch
114-
if: inputs.is_branch_protected == 'false'
115-
shell: bash
116-
run: |
117-
git push --follow-tags
118-
env:
119-
REF: ${{ github.ref }}
120-
121-
- name: Push to protected branch
122-
if: inputs.is_branch_protected == 'true'
123-
uses: CasperWA/push-protected@v2
124-
with:
125-
token: ${{ secrets.GITHUB_TOKEN }}
126-
branch: main
127-
unprotect_reviews: true
128-
tags: true
129-
130-
- name: Publish release
131-
uses: ncipollo/release-action@v1
132-
with:
133-
name: Release ${{ env.NEW_VERSION }}
134-
commit: ${{ env.REF }}
135-
draft: false
136-
prerelease: false
137-
generateReleaseNotes: true
138-
token: ${{ secrets.GITHUB_TOKEN }}
139-
makeLatest: ${{ inputs.latest }}
140-
tag: ${{ env.NEW_VERSION }}
141-
142150
- name: Release
143151
uses: svenstaro/upload-release-action@v2
144152
with:

0 commit comments

Comments
 (0)