Skip to content

Commit ed0cd45

Browse files
committed
update release workflow. On release upload app bundle to release page
1 parent a1f19d0 commit ed0cd45

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
package-name: ${{env.NPM_MODULE_NAME}}
3030
pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]'
3131
# The logic below handles the npm publication:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333
# these if statements ensure that a publication only occurs when
3434
# a new release is created:
3535
if: ${{ steps.release.outputs.release_created }}
@@ -110,3 +110,41 @@ jobs:
110110
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
111111
subject-digest: ${{ steps.push.outputs.digest }}
112112
github-token: ${{ secrets.GITHUB_TOKEN }}
113+
114+
publish_artifacts:
115+
name: Package and upload release artifacts
116+
runs-on: ubuntu-latest
117+
needs: release_please
118+
if: ${{needs.release_please.outputs.release_created}}
119+
120+
steps:
121+
- name: Checkout repository
122+
uses: actions/checkout@v4
123+
124+
- name: Setup Node
125+
uses: actions/setup-node@v3
126+
with:
127+
node-version: 18
128+
129+
- name: Install dependencies
130+
run: npm install --omit=dev
131+
132+
- name: Create zip archive
133+
run: |
134+
# Create a zip archive excluding .git directory
135+
zip -r ${{env.IMAGE_NAME}}-${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}.zip . -x "*.git*" "*.git/*"
136+
137+
- name: Create tar.gz archive
138+
run: |
139+
# Create a tar.gz archive excluding .git directory
140+
tar --exclude='.git' --exclude='.git/*' -czf ${{env.IMAGE_NAME}}-${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}.tar.gz .
141+
142+
- name: Upload artifacts to release
143+
uses: softprops/action-gh-release@v2
144+
with:
145+
files: |
146+
${{env.IMAGE_NAME}}-${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}.zip
147+
${{env.IMAGE_NAME}}-${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}.tar.gz
148+
tag_name: v${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}
149+
env:
150+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)