Skip to content

Commit

Permalink
use tag to run workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cdsupina committed May 3, 2023
1 parent d944dfe commit fda4229
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: 🚀 Release

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

defaults:
run:
Expand All @@ -22,8 +25,9 @@ jobs:
- { os: macos-latest, target: "aarch64-apple-darwin" }
- { os: windows-latest, target: "x86_64-pc-windows-msvc" }
steps:
- name: 📠 Calculate Release Version
run: echo "RELEASE_VERSION=$test" >> $GITHUB_ENV
- name: 📠 Set Release Version
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV

- name: ⬇️ Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -90,20 +94,27 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: ⬇️ Checkout
uses: actions/checkout@v3

- name: ⬇️ Download Artifacts
uses: actions/download-artifact@v2

- name: 📠 Set Release Version
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV

- name: 🔒 Generate Checksums
run: for file in thetawave-*/thetawave-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done

- name: 🚀 Publish Release
uses: svenstaro/upload-release-action@v2
with:
release_name: ${{ needs.build_release.outputs.release_version }}
release_name: Release ${{ env.RELEASE_VERSION }}
file: thetawave-*/thetawave-*
file_glob: true
overwrite: true
prerelease: ${{ github.event_name != 'push' }}
body: ${{ needs.generate_changelog.outputs.release_body }}
tag: ${{ needs.build_release.outputs.release_version }}
body: 'Thetawave ${{ env.RELEASE_VERSION }}'
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fda4229

Please sign in to comment.