Skip to content

Commit

Permalink
ci(release): add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
brigand committed Oct 11, 2020
1 parent 9249389 commit 5895fe4
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Usage:
# git tag -a vX.X.X
# git push --tagsA
#
# Source: https://daniellockyer.com/automated-rust-releases/

name: Release

on:
push:
tags:
- "v*"

jobs:
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [linux, windows, macos]

include:
- name: linux
os: ubuntu-latest
artifact_name: glint
asset_name: glint-linux
- name: windows
os: windows-latest
artifact_name: glint.exe
asset_name: glint-windows
- name: macos
os: macos-latest
artifact_name: glint
asset_name: glint-macos

steps:
- uses: actions/checkout@v1

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build
run: cargo build --release --locked

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}

0 comments on commit 5895fe4

Please sign in to comment.