ci: release on every push to main branch
- remove tag-only condition for release job - publish zip to "latest" tag on every main push
This commit is contained in:
@@ -35,7 +35,6 @@ jobs:
|
||||
run: npm run build
|
||||
|
||||
- name: Upload build artifact
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: resume-static
|
||||
@@ -44,7 +43,7 @@ jobs:
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -54,11 +53,13 @@ jobs:
|
||||
|
||||
- name: Create release zip
|
||||
run: |
|
||||
cd out && zip -r ../resume-${GITHUB_REF_NAME}.zip .
|
||||
zip -r resume-latest.zip out/
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: resume-${GITHUB_REF_NAME}.zip
|
||||
generate_release_notes: true
|
||||
tag_name: latest
|
||||
name: Latest Build
|
||||
body: Auto-generated from latest commit on main branch
|
||||
files: resume-latest.zip
|
||||
fail_on_unmatched_files: true
|
||||
|
||||
Reference in New Issue
Block a user