Merge pull request #38 from openziti/dependabot/go_modules/third-part… #76
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
name: build | |
on: | |
push: | |
branches: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20.x' | |
- name: Build | |
env: | |
gh_ci_key: ${{ secrets.GH_CI_KEY }} | |
ziti_ci_gpg_key: ${{ secrets.ZITI_CI_GPG_KEY }} | |
ziti_ci_gpg_key_id: ${{ secrets.ZITI_CI_GPG_KEY_ID }} | |
run: | | |
mkdir -p tmp | |
go build -o tmp ./... | |
./tmp/ziti-ci configure-git | |
./tmp/ziti-ci generate-build-info cmd/build_info.go cmd | |
go build -o tmp ./... | |
echo "ZITI_CI_VERSION=$(./tmp/ziti-ci get-next-version -q)" >> $GITHUB_ENV | |
./tmp/ziti-ci tag -v -f version | |
- name: Publish | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ env.ZITI_CI_VERSION }} | |
release_name: Release ${{ env.ZITI_CI_VERSION }} | |
draft: false | |
prerelease: false | |
- name: Upload Ziti CI | |
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: ./tmp/ziti-ci | |
asset_name: ziti-ci | |
asset_content_type: application/octet-stream |