Skip to content

Commit

Permalink
set version, automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
grenade committed Jun 7, 2021
1 parent 9565a12 commit eaeac9e
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 291 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: parse tag
id: parse_tag
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
return context.payload.ref.replace(/refs\/tags\//, '')
- uses: actions/checkout@v2
with:
ref: ${{ steps.parse_tag.outputs.result }}
fetch-depth: 1
- name: dependencies
run: |
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc --force
- name: build
run: cargo build --verbose --release -p snapr
- name: strip
run: strip target/release/snapr
- name: rename
run: mv target/release/snapr target/release/snapr_${{ steps.parse_tag.outputs.result }}_amd64
- name: publish
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
target/release/snapr_${{ steps.parse_tag.outputs.result }}_amd64
144 changes: 72 additions & 72 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eaeac9e

Please sign in to comment.