Skip to content

Commit b2c70df

Browse files
Merge pull request #1 from frontendweb3/copilot/update-release-zip-workflow
2 parents 7936f84 + 08a1b86 commit b2c70df

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/release-zip.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
# Builds the theme zip and uploads it as a release asset whenever a GitHub
2+
# Release is published. Uses only the built-in GITHUB_TOKEN — no extra secrets
3+
# or PATs are required. To trigger: publish a release in the GitHub UI or via
4+
# the API. The uploaded asset will be named logly-<tag>.zip.
15
name: Release Zip
26

37
on:
48
release:
5-
types: [created]
9+
types: [published]
610

711
jobs:
812
build-and-attach:
913
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1016
steps:
1117
- name: Checkout
1218
uses: actions/checkout@v4
@@ -33,11 +39,11 @@ jobs:
3339

3440
- name: Build assets
3541
run: pnpm run build
36-
42+
3743
- name: Create release archive
3844
run: |
3945
mkdir -p dist-artifacts
40-
pnpm bestzip dist-artifacts/logly-${{ github.ref_name }}.zip \
46+
pnpm bestzip dist-artifacts/logly-${{ github.event.release.tag_name }}.zip \
4147
*.hbs \
4248
partials \
4349
assets/dist \
@@ -48,11 +54,8 @@ jobs:
4854
4955
- name: Upload release asset
5056
uses: softprops/action-gh-release@v2.5.0
51-
if: github.ref_type == 'tag'
5257
with:
53-
files: dist-artifacts/logly-${{ github.ref_name }}.zip
54-
tag_name: ${{ github.ref_name }}
55-
name: ${{ github.ref_name }}
56-
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
files: dist-artifacts/logly-${{ github.event.release.tag_name }}.zip
59+
tag_name: ${{ github.event.release.tag_name }}
60+
overwrite: true
61+
token: ${{ github.token }}

0 commit comments

Comments
 (0)