-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Binary release creation workflows (#262)
* Binary release creation workflows This PR adds the ability to upload release artifact via XCHammer's github CI and it creates a release when pushing a tag to v* The github actions API doesn't play well with per commit artifacts. For now we create a release when pushing a tag. Consuming the per commit artifacts w/o the github actions API is blocked by this: actions/upload-artifact#50
- Loading branch information
1 parent
25266d7
commit e72c823
Showing
5 changed files
with
194 additions
and
32 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
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
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This workflow cuts a per commit binary release of XCHammer and uploads | ||
# the binary release WORKSPACE for later consumption. | ||
# | ||
# Basically push a tag to github for the commit and this will append the | ||
# release artifact | ||
# | ||
# Ideally we'd create a Bazel consumeable artifact per commit but using github | ||
# actions w/o any other systems it's not so possible | ||
# https://github.com/actions/upload-artifact/issues/50 | ||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Upload Release Artifact | ||
|
||
jobs: | ||
build: | ||
name: create_release | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: bazel_cache_release | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: bazel-cache-release | ||
with: | ||
path: ~/Library/Caches/Bazel | ||
key: ${{ runner.os }}-build-${{ env.cache-name }} | ||
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}- | ||
|
||
- name: make_release | ||
run: make release | ||
- name: create_release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- 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: bazel-bin/xchammer_dist_repo.zip | ||
asset_name: xchammer.zip | ||
asset_content_type: application/zip | ||
|
||
|
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
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