diff options
author | Justin Cichra <1342149+jrcichra@users.noreply.github.com> | 2020-04-09 18:58:16 -0400 |
---|---|---|
committer | Justin Cichra <1342149+jrcichra@users.noreply.github.com> | 2020-04-10 08:34:24 -0400 |
commit | d89d355dc1453c280f99d9a49b9163e568a81517 (patch) | |
tree | bad6e55c5f540c57a1e32a26b2ac7f6476a3b951 /.github/workflows | |
parent | ddb13897c089c78c8b858579572022099fc55e84 (diff) | |
download | gfold-d89d355dc1453c280f99d9a49b9163e568a81517.zip |
Add build for Win/Mac/Linux AMD64 and Github Releases
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/rust.yml | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3f6c09c..fabfb2d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -46,10 +46,12 @@ jobs: uses: actions-rs/cargo@v1
with:
command: test
-
build:
name: Build
- runs-on: ubuntu-latest
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest,windows-latest,macos-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
@@ -63,4 +65,25 @@ jobs: uses: actions-rs/cargo@v1
with:
command: build
- args: --release
\ No newline at end of file + args: --release
+ - name: Rename (Linux)
+ if: runner.os == 'Linux'
+ run: |
+ cp target/release/gfold ./gfold-linux-amd64
+ - name: Rename (MacOS)
+ if: runner.os == 'MacOS'
+ run: |
+ cp target/release/gfold ./gfold-macos-amd64
+ - name: Rename (Windows)
+ if: runner.os == 'Windows'
+ run: |
+ Copy-Item target\release\gfold.exe gfold-windows-amd64.exe
+ - name: Github Release
+ if: github.actor == 'nickgerace'
+ uses: ncipollo/release-action@v1.6.1
+ with:
+ tag: ${{ github.run_number }}
+ artifacts: "gfold*"
+ allowUpdates: "true"
+ token: ${{ secrets.GITHUB_TOKEN }}
+
|