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
|
run: npm run build
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: resume-static
|
name: resume-static
|
||||||
@@ -44,7 +43,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Download build artifact
|
- name: Download build artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@@ -54,11 +53,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release zip
|
- name: Create release zip
|
||||||
run: |
|
run: |
|
||||||
cd out && zip -r ../resume-${GITHUB_REF_NAME}.zip .
|
zip -r resume-latest.zip out/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: resume-${GITHUB_REF_NAME}.zip
|
tag_name: latest
|
||||||
generate_release_notes: true
|
name: Latest Build
|
||||||
|
body: Auto-generated from latest commit on main branch
|
||||||
|
files: resume-latest.zip
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
|
|||||||
Reference in New Issue
Block a user