-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release option for asset generation. (#1102)
Co-authored-by: Drew Crampsie <[email protected]>
- Loading branch information
Showing
3 changed files
with
55 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_release: | ||
name: build_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: print out github context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: list all github action env vars | ||
run: env | ||
- name: build artifacts | ||
run: make -C docker BRANCH=${{ github.event.release.tag_name }} fedora ubuntu package-tgz package-fedora package-ubuntu | ||
- name: upload fedora artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: gerbil-${{ github.event.release.tag_name }}.fedora-1.0-1.x86_64.rpm | ||
asset_name: gerbil-${{ github.event.release.tag_name }}.fedora-1.0-1.x86_64.rpm | ||
asset_content_type: application/zip | ||
|
||
- name: upload ubuntu artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: gerbil-${{ github.event.release.tag_name }}.ubuntu-1.0_amd64.deb | ||
asset_name: gerbil-${{ github.event.release.tag_name }}.ubuntu_1.0_amd64.deb | ||
asset_content_type: application/zip | ||
|
||
- name: upload tgz | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: gerbil-${{ github.event.release.tag_name }}.x86_64.tgz | ||
asset_name: gerbil-${{ github.event.release.tag_name }}.x86_64.tgz | ||
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