Skip to content

Commit

Permalink
GitHub release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeedvh authored Mar 7, 2022
1 parent 8236e23 commit d8b5df7
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: paydept Release Action

on:
release:
types: [created]

jobs:
build-ubuntu:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

- name: Build
run: cargo build --all --release && strip target/release/paydept && mv target/release/paydept target/release/paydept_amd64

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/paydept_amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-win:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

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

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/paydept.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-mac:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
default: true
override: true

- name: Build for mac
run: cargo build --all --release && strip target/release/paydept && mv target/release/paydept target/release/paydept_darwin

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/paydept_darwin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d8b5df7

Please sign in to comment.