Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
funbiscuit committed Oct 13, 2022
1 parent dbac5a1 commit f1855a0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -56,5 +56,34 @@ jobs:
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: spacedisplay-win64.exe
name: spacedisplay-win64
path: ${{github.workspace}}/target/release/spacedisplay-cli.exe

add-release-assets:
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs: [ build-win, build-linux ]
steps:
- uses: actions/download-artifact@v2
with:
path: artifacts

- name: Display structure of downloaded files
working-directory: artifacts
run: ls -R

- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/spacedisplay-win64/spacedisplay-cli.exe
tag: ${{ github.ref }}
asset_name: SpaceDisplay-msvc19-Win32.zip
overwrite: true

- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/spacedisplay-amd64_linux/spacedisplay-cli
tag: ${{ github.ref }}
asset_name: spacedisplay-amd64_linux
overwrite: true
22 changes: 22 additions & 0 deletions .github/workflows/release.yaml
@@ -0,0 +1,22 @@
name: Release
on:
push:
tags:
- '*'

jobs:
create-release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: version
run: echo "::set-output name=version::${GITHUB_REF##*/}"
id: version

- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.RELEASE_ACCESS_TOKEN }}
name: spacedisplay ${{ steps.version.outputs.version }}
draft: false
prerelease: true

0 comments on commit f1855a0

Please sign in to comment.