Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,29 @@ concurrency:

jobs:
promote-harness-variants:
name: Promote image to latest
name: Promote image and publish release artifacts
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
contents: write
id-token: write
attestations: write
strategy:
fail-fast: false
env:
IMAGE_NAME: docker.io/moltenai/moltenhub-dispatch
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v4

Expand Down Expand Up @@ -60,3 +71,20 @@ jobs:
subject-digest: ${{ steps.digest.outputs.value }}
push-to-registry: true
create-storage-record: false

- name: Compute GitHub Release tag
id: release
run: |
RELEASE_TAG="$(date -u +'v%Y.%-m.%-d')+${GITHUB_RUN_NUMBER}.${GITHUB_RUN_ATTEMPT}"
echo "tag=${RELEASE_TAG}" >> "$GITHUB_OUTPUT"

- name: Publish GitHub Release artifacts
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ steps.release.outputs.tag }}
SOURCE_TAG: ${{ github.event.inputs.source_tag }}
46 changes: 46 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

project_name: moltenhub-dispatch

before:
hooks:
- go mod download

builds:
- id: moltenhub-dispatch
main: ./cmd/moltenhub-dispatch
binary: moltenhub-dispatch
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64

archives:
- id: moltenhub-dispatch
ids:
- moltenhub-dispatch
formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"

release:
prerelease: false
make_latest: true
header: |
Docker image promoted from `{{ .Env.SOURCE_TAG }}` to `latest`.

changelog:
sort: asc
Loading