Skip to content

Commit

Permalink
Add github action for publishing releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikkel-T committed Jun 13, 2022
1 parent 8ba87e5 commit e1223eb
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]

jobs:
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: tic-tac-toe
asset_name: tic-tac-toe-linux
- os: windows-latest
artifact_name: tic-tac-toe.exe
asset_name: tic-tac-toe-windows.exe
- os: macos-latest
artifact_name: tic-tac-toe
asset_name: tic-tac-toe-macos

steps:
- uses: actions/checkout@v2
- name: install dependencies (ubuntu)
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev
if: contains(matrix.os, 'ubuntu')
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}

0 comments on commit e1223eb

Please sign in to comment.