Skip to content

Commit

Permalink
release build support
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeswenson committed May 3, 2020
1 parent 5cd742f commit 1a5db7f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ set_cargo_args

set -x

cargo build --verbose --locked "${CARGO_ARGS[@]}"
cargo build --verbose --release --locked "${CARGO_ARGS[@]}"
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
matrix:
build:
- type: linux
os: ubuntu-latest
features: no-default
- type: linux
os: ubuntu-latest
- type: linux
features: default
os: ubuntu-latest
- type: mac
os: macos-10.15
features: default
os: macos-10.15
runs-on: ${{matrix.build.os}}
env:
FEATURE_BUILD: ${{matrix.build.features}}
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@ name: Build, Release, Publish to GH and Cargo
jobs:
build:
name: Release Build
runs-on: ubuntu-latest
strategy:
matrix:
build:
- name: 'linux-no-features'
type: linux
features: no-default
os: ubuntu-latest
- name: 'linux'
type: linux
features: default
os: ubuntu-latest
- name: 'macos'
type: mac
features: default
os: macos-10.15
runs-on: ${{matrix.build.os}}
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
- name: build
run: |
cargo build --release --locked --verbose
- name: Create Release
Expand All @@ -22,16 +37,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
release_name: v${{ github.ref }}
draft: true
prerelease: false
- name: Prepare for upload
run: |
./.ci/setup_deploy.sh
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./my-artifact.zip
asset_path: ./target/release/.zip
asset_name: my-artifact.zip
asset_content_type: application/zip

0 comments on commit 1a5db7f

Please sign in to comment.