ci: Test VPP 24.06 (#244) #92
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: | |
- master | |
tags: | |
- 'v*' | |
pull_request: | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
permissions: | |
contents: write | |
packages: write | |
issues: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Setup Go" | |
uses: actions/setup-go@v5 | |
- name: "Download Syft" | |
uses: anchore/sbom-action/download-syft@v0 #v0.15.10 | |
- name: 'Login to GitHub Container Registry' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: "Print environment" | |
run: | | |
env | sort | |
- name: "Release Version" | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOSTNAME: github | |
- name: "Release Snapshot" | |
if: success() && !startsWith(github.ref, 'refs/tags/v') | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: release --clean --snapshot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOSTNAME: github | |
- name: "Upload Artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: govpp-artifacts | |
path: | | |
dist/* | |
!dist/govpp-build* |