Skip to content

Commit

Permalink
fixup: check if current ref is tag (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovebaihezi authored Oct 11, 2024
1 parent fdfd87a commit 267a4ac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ jobs:
run: |
zip --recurse-paths ../${{ env.binary }}.zip .
- name: Upload binaries to artifacts
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
path: ${{ env.binary }}.zip
name: linux
retention-days: 1
- name: Upload binaries to release
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ env.binary }}.zip
Expand Down Expand Up @@ -142,14 +142,14 @@ jobs:
run: |
Compress-Archive -Path windows/* -DestinationPath ${{ env.binary }}.zip
- name: Upload binaries to artifacts
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
path: ${{ env.binary }}.zip
name: windows
retention-days: 1
- name: Upload binaries to release
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ env.binary }}.zip
Expand Down Expand Up @@ -189,14 +189,14 @@ jobs:
cp -r assets ${{ env.binary }}.app/Contents/MacOS/ || true # Try to copy, but ignore if it can't copy if source directory does not exist
hdiutil create -fs HFS+ -volname "${{ env.binary }}" -srcfolder ${{ env.binary }}.app ${{ env.binary }}-macOS-intel.dmg
- name: Upload binaries to artifacts
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
path: ${{ env.binary }}-macOS-intel.dmg
name: macOS-intel
retention-days: 1
- name: Upload binaries to release
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ env.binary }}-macOS-intel.dmg
Expand Down Expand Up @@ -233,15 +233,15 @@ jobs:
hdiutil create -fs HFS+ -volname "${{ env.binary }}-macOS-apple-silicon" -srcfolder ${{ env.binary }}.app ${{ env.binary }}-macOS-apple-silicon.dmg
- name: Upload binaries to artifacts
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
path: ${{ env.binary }}-macOS-apple-silicon.dmg
name: macOS-apple-silicon
retention-days: 1

- name: Upload binaries to release
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags/*' }}
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ env.binary }}-macOS-apple-silicon.dmg
Expand Down

0 comments on commit 267a4ac

Please sign in to comment.