-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try using my own Github action: get-release
- Loading branch information
1 parent
501d822
commit d427ed1
Showing
1 changed file
with
15 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
@@ -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 |