Update aws-sdk-go-v2 monorepo #2163
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
jobs: | |
binary: | |
name: Build Binary | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: stable | |
- name: Determine GOPATH | |
id: go | |
run: echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Build binary | |
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | |
with: | |
version: v2.3.2 # renovate: datasource=github-tags depName=goreleaser/goreleaser | |
args: build --snapshot --clean --single-target | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GOPATH: ${{ steps.go.outputs.go_path }} | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: stable | |
- name: Run Tests | |
run: make test | |
build: | |
name: Build Packages | |
runs-on: ubuntu-24.04 | |
needs: [binary, unit-tests] | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: stable | |
- name: Determine GOPATH | |
id: go | |
run: echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Draft Release Notes | |
uses: lucacome/draft-release@5d29432a46bff6c122cd4b07a1fb94e1bb158d34 # v1.1.1 | |
with: | |
minor-label: "enhancement" | |
major-label: "change" | |
publish: ${{ github.ref_type == 'tag' }} | |
collapse-after: 50 | |
notes-footer: | | |
## Resources | |
- Documentation -- https://github.com/nginxinc/nginx-asg-sync/blob/{{version}}/README.md | |
if: github.event_name != 'pull_request' | |
- name: Download Syft | |
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2 | |
if: github.ref_type == 'tag' | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 | |
if: github.ref_type == 'tag' | |
- name: Setup Snapcraft | |
run: | | |
sudo snap install snapcraft --classic | |
mkdir -p $HOME/.cache/snapcraft/download | |
mkdir -p $HOME/.cache/snapcraft/stage-packages | |
if: github.ref_type == 'tag' | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | |
with: | |
version: v2.3.2 # renovate: datasource=github-tags depName=goreleaser/goreleaser | |
args: ${{ github.ref_type == 'tag' && 'release' || 'build --snapshot' }} --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GOPATH: ${{ steps.go.outputs.go_path }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }} | |
NGINX_GITHUB_TOKEN: ${{ secrets.NGINX_PAT }} |