-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
47 lines (46 loc) · 1.48 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Publish Artifacts
description: 'Publish artifacts to Github Release'
inputs:
token:
description: 'Token to use for publishing.'
required: true
homebrew-gh-secret:
description: 'SSH private key used as a GitHub deploy key for publishing to homebrew-tap.'
required: true
dry-run:
description: 'Is this a dry run. If so no package will be published.'
required: false
default: 'true'
tag:
description: 'Tag to upload artifacts to.'
required: true
outputs:
hashes:
description: sha256sum hashes of built artifacts
value: ${{ steps.hash.outputs.hashes }}
runs:
using: composite
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/386
- name: Login to Docker
shell: bash
run: |
echo $DOCKER_TOKEN | docker login --username $DOCKER_USERNAME --password-stdin
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release ${{ inputs.dry-run == 'true' && '--skip=publish' || '' }} --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ inputs.token }}
HOMEBREW_DEPLOY_KEY: ${{ inputs.homebrew-gh-secret }}
- name: Hash build artifacts for provenance
id: hash
shell: bash
run: |
echo "hashes=$(sha256sum dist/*.tar.gz | base64 -w0)" >> "$GITHUB_OUTPUT"