Skip to content

Commit

Permalink
fix token, add upload source
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Jun 15, 2024
1 parent da3512c commit 4953c58
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- v*.*.*
workflow_dispatch:

jobs:
upload-binaries:
Expand All @@ -22,8 +23,9 @@ jobs:
with:
version: 0.12.0

- name: Print Zig meta
- name: Print meta
run: |
echo $GITHUB_REF_NAME
zig version
zig env
Expand Down Expand Up @@ -76,7 +78,7 @@ jobs:
overwrite: true
tag: ${{ github.ref }}
release_name: 'Release v${{ env.RELEASE_VERSION }}'
repo_token: ${{ secrets.GITHUB_TOKEN }}
repo_token: ${{ secrets.RELEASE_TOKEN }}
draft: true

# Upload artifacts to GHA for inspection incase something
Expand All @@ -89,3 +91,31 @@ jobs:
retention-days: 3
overwrite: true
if-no-files-found: error

upload-source:
name: Upload Source
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Set release version
run: echo "RELEASE_VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV

- name: Prepare source code
run: |
cd ..
zip -r v${{ env.RELEASE_VERSION }}.zip ${{ github.event.repository.name }}
tar -czvf v${{ env.RELEASE_VERSION }}.tar.gz ${{ github.event.repository.name }}
mv v${{ env.RELEASE_VERSION }}* ${{ github.event.repository.name }}
- name: Upload for release
uses: svenstaro/upload-release-action@v2
with:
file: v${{ env.RELEASE_VERSION }}*
file_glob: true
overwrite: true
tag: ${{ github.ref }}
release_name: 'Release v${{ env.RELEASE_VERSION }}'
repo_token: ${{ secrets.RELEASE_TOKEN }}
draft: true

0 comments on commit 4953c58

Please sign in to comment.