Skip to content

Commit

Permalink
Harden release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Admiral-Piett committed Aug 3, 2023
1 parent bc027e4 commit a638d02
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/realease.yaml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@ on:
required: true

jobs:
tag:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
fetch-depth: '0'

- name: Print Input
run: echo "${{ inputs.tag }}"

- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
WITH_V: true
CUSTOM_TAG: "v${{ inputs.tag }}"

goreleaser:
needs: tag
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,7 +37,25 @@ jobs:
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
version: v1.19.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}

tag:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
fetch-depth: '0'

- name: Print Input
run: echo "${{ inputs.tag }}"

- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
WITH_V: true
CUSTOM_TAG: "v${{ inputs.tag }}"
17 changes: 9 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ builds:
goarm: 7

dockers:
- use: buildx
goos: linux
- goos: linux
goarch: amd64
dockerfile: goreleaser.dockerfile
image_templates:
Expand All @@ -53,12 +52,14 @@ dockers:
- app/conf/goaws.yaml

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- id: archive_names
name_template: >-
{{- .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down

0 comments on commit a638d02

Please sign in to comment.