Skip to content

Commit

Permalink
chore(ci): include branch name in filename, tweak conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick committed Oct 14, 2024
1 parent fb18a87 commit cfe1665
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/buildcdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,30 @@ jobs:
run: |
chmod +x generate.sh
./generate.sh
- name: Compose release filename
run: echo "artifact_name=sdcard-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: sdcard-latest
name: "${{ env.artifact_name }}"
path: |
dist/*
sdcard.json
upload-release:
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
if: github.event_name != 'pull_request'
needs: build-artifact
runs-on: ubuntu-latest
steps:
- name: Compose release filename
run: echo "artifact_name=sdcard-${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: sdcard-latest
name: "${{ env.artifact_name }}"
path: .
- name: Deploy release
- name: Deploy Latest Release
uses: crowbarmaster/GH-Automatic-Releases@latest
if: github.ref == 'refs/heads/master'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
Expand Down

0 comments on commit cfe1665

Please sign in to comment.