You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			70 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: release
 | |
| 
 | |
| on:
 | |
|   workflow_dispatch:
 | |
|   schedule:
 | |
|     - cron: 0 0 * * 4
 | |
| 
 | |
| permissions:
 | |
|   contents: write
 | |
|   id-token: write
 | |
|   packages: write
 | |
| 
 | |
| jobs:
 | |
|   goreleaser:
 | |
|     runs-on: ubuntu-latest
 | |
|     env:
 | |
|       DOCKER_CLI_EXPERIMENTAL: "enabled"
 | |
|     steps:
 | |
|       - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
 | |
|         with:
 | |
|           fetch-depth: 0
 | |
|       - uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
 | |
|         with:
 | |
|           version: 3.x
 | |
|           repo-token: ${{ secrets.GITHUB_TOKEN }}
 | |
|       - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
 | |
|       - uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2
 | |
|       - name: setup-snapcraft
 | |
|         # FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715
 | |
|         run: |
 | |
|           sudo apt-get update
 | |
|           sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
 | |
|           mkdir -p $HOME/.cache/snapcraft/download
 | |
|           mkdir -p $HOME/.cache/snapcraft/stage-packages
 | |
|       - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4
 | |
|         with:
 | |
|           go-version: stable
 | |
|       - uses: sigstore/cosign-installer@v3.1.1
 | |
|       - uses: anchore/sbom-action/download-syft@v0.14.3
 | |
|       - uses: crazy-max/ghaction-upx@v2
 | |
|         with:
 | |
|           install-only: true
 | |
|       - uses: cachix/install-nix-action@v22
 | |
|         with:
 | |
|           github_access_token: ${{ secrets.GITHUB_TOKEN }}
 | |
|       - name: dockerhub-login
 | |
|         if: startsWith(github.ref, 'refs/tags/v')
 | |
|         uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
 | |
|         with:
 | |
|           username: ${{ secrets.DOCKER_USERNAME }}
 | |
|           password: ${{ secrets.DOCKER_PASSWORD }}
 | |
|       - name: ghcr-login
 | |
|         if: startsWith(github.ref, 'refs/tags/v')
 | |
|         uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
 | |
|         with:
 | |
|           registry: ghcr.io
 | |
|           username: ${{ github.repository_owner }}
 | |
|           password: ${{ secrets.GITHUB_TOKEN }}
 | |
|       - name: snapcraft-login
 | |
|         if: startsWith(github.ref, 'refs/tags/v')
 | |
|         run: snapcraft login --with <(echo "${{ secrets.SNAPCRAFT_LOGIN }}")
 | |
|       - uses: goreleaser/goreleaser-action@v4
 | |
|         with:
 | |
|           distribution: goreleaser-pro
 | |
|           version: nightly
 | |
|           args: release --clean --nightly -f .goreleaser-nightly.yaml
 | |
|         env:
 | |
|           GITHUB_TOKEN: ${{ secrets.GH_PAT }}
 | |
|           GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
 |