feat!: Initial commit #1
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: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
packages: write | |
id-token: write | |
env: | |
GO111MODULE: "on" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Release | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
provider: | |
if: needs.release.outputs.release_created | |
runs-on: ubuntu-latest | |
name: Publish Provider | |
needs: | |
- release | |
strategy: | |
max-parallel: 4 | |
matrix: | |
go-version: [1.22.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "${{ matrix.go-version }}" | |
- name: Install cosign | |
uses: sigstore/[email protected] | |
- name: Download Syft | |
uses: anchore/sbom-action/[email protected] | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release via GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
args: -p 3 release --clean --timeout 60m0s | |
version: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CI_COMMIT_TIMESTAMP: ${{ github.event.repository.updated_at }} | |
CI_COMMIT_SHA: ${{ github.sha }} | |
CI_COMMIT_TAG: ${{ needs.release.outputs.tag_name }} |