Skip to content

Commit c591231

Browse files
Update release.yml (#6)
Updates release logic to work on tag creation, to side-step a permissions problem with actually creating a release.
1 parent cbdb9a3 commit c591231

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
1-
name: Attach LFS-aware ZIP Binary to Release
1+
name: Automated Release with ZIP
22

33
on:
4-
release:
5-
types: [created]
4+
push:
5+
tags:
6+
- 'v*' # Only run on version tags like v1.2.3
67

78
jobs:
8-
upload-zip:
9-
name: Archive and Upload
9+
release:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout full history and tags
13+
- name: Checkout full repo
1414
uses: actions/checkout@v4
1515
with:
16-
fetch-depth: 0 # Needed for git archive + tags
16+
fetch-depth: 0
17+
lfs: true # Also pulls Git LFS files
1718

18-
- name: Set up Git LFS
19+
- name: Set up Git LFS (redundant safety)
1920
run: |
2021
git lfs install
2122
git lfs pull
2223
2324
- name: Create ZIP from commec-dbs subdirectory
24-
run: |
25-
zip -r commec-dbs.zip commec-dbs
25+
run: zip -r commec-dbs.zip commec-dbs
2626

27-
- name: Upload ZIP to release
27+
- name: Create GitHub Release and upload ZIP
2828
uses: softprops/action-gh-release@v1
2929
with:
30+
tag_name: ${{ github.ref_name }}
31+
name: Release ${{ github.ref_name }}
3032
files: commec-dbs.zip
3133
env:
3234
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)