Skip to content

Commit

Permalink
Try using my own Github action: get-release
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceadams committed Feb 20, 2020
1 parent 501d822 commit d427ed1
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
name: Release
name: Release Binaries

on:
push:
tags: "*"
release:
types: [created]

env:
GITHUB_TOKEN: ${{ github.token }}

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/[email protected]
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

macos:
needs: release
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Release
id: get_release
uses: bruceadams/get-release@v1
- name: Build
run: cargo build --release --verbose
- name: Upload Release Asset
uses: actions/[email protected]
with:
upload_url: ${{ release.steps.create_release.outputs.upload_url }}
upload_url: ${{ get_release.outputs.upload_url }}
asset_path: ./target/release/yj
asset_name: yj.macos
asset_content_type: application/octet-stream
Expand All @@ -44,14 +35,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Release
id: get_release
uses: bruceadams/get-release@v1
- name: Build
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl --verbose
- name: Upload Release Asset
uses: actions/[email protected]
with:
upload_url: ${{ release.steps.create_release.outputs.upload_url }}
upload_url: ${{ get_release.outputs.upload_url }}
asset_path: ./target/release/yj
asset_name: yj.linux
asset_content_type: application/octet-stream
Expand All @@ -63,12 +57,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Release
id: get_release
uses: bruceadams/get-release@v1
- name: Build
run: cargo build --release --verbose
- name: Upload Release Asset
uses: actions/[email protected]
with:
upload_url: ${{ release.steps.create_release.outputs.upload_url }}
upload_url: ${{ get_release.outputs.upload_url }}
asset_path: ./target/release/yj.exe
asset_name: yj.exe
asset_content_type: application/octet-stream

0 comments on commit d427ed1

Please sign in to comment.