File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
15name : Release Zip
26
37on :
48 release :
5- types : [created ]
9+ types : [published ]
610
711jobs :
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 \
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 }}
You can’t perform that action at this time.
0 commit comments