-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from nitrictech/feature/release-workflow
New dev/prod release workflow.
- Loading branch information
Showing
7 changed files
with
206 additions
and
139 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,62 @@ | ||
name: Release Binaries | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
add_binaries: | ||
name: Add Binaries to release | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: /home/runner/go | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16.7 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
- name: Install modules | ||
run: make install-tools | ||
- name: Make binaries | ||
run: make build-all-binaries | ||
- name: Upload Dev | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./bin/membrane-dev | ||
asset_name: membrane-dev | ||
asset_content_type: application/octet-stream | ||
- name: Upload AWS | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./bin/membrane-aws | ||
asset_name: membrane-aws | ||
asset_content_type: application/octet-stream | ||
- name: Upload GCP | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./bin/membrane-gcp | ||
asset_name: membrane-gcp | ||
asset_content_type: application/octet-stream | ||
- name: Upload Digital Ocean | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./bin/membrane-do | ||
asset_name: membrane-do | ||
asset_content_type: application/octet-stream |
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,41 @@ | ||
name: Release Contracts | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
# Bump the membrane version | ||
contract_release: | ||
name: Add contracts to release | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: /home/runner/go | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Add validate contract to the released contracts | ||
- name: Download validate contract | ||
run: | | ||
mkdir -p ./contracts/validate | ||
curl https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/v0.6.1/validate/validate.proto --output ./contracts/validate/validate.proto | ||
# Tarball the contracts repository | ||
- name: Archive Release | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
type: 'tar' | ||
filename: 'contracts.tgz' | ||
path: contracts | ||
|
||
# Upload contract tarball to the releases | ||
- name: Upload Contracts | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./contracts.tgz | ||
asset_name: contracts.tgz | ||
asset_content_type: application/tar+gzip | ||
|
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 was deleted.
Oops, something went wrong.
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,35 @@ | ||
name: Production Release | ||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- 'main' | ||
jobs: | ||
# Bump the membrane version | ||
version_bump: | ||
if: github.event.pull_request.merged == true | ||
name: Bump Version and Create Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version_id: ${{ steps.tag_version.outputs.new_tag }} | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
# Use GITHUB_TOKEN here to prevent further workflows | ||
# generated on 'tag' action | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create a GitHub release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
# Use NITRIC_BOT_TOKEN here to | ||
# trigger release 'published' workflows | ||
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.tag_version.outputs.new_tag }} | ||
release_name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} |
Oops, something went wrong.