Skip to content

Commit

Permalink
chore: Release workflow (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
efirs authored Aug 30, 2024
1 parent 0e49b0a commit 3cd0fc2
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/go-releaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: goreleaser

on:
release:
types: [created]

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch Git tags
run: git fetch --force --tags

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'
cache: true

- name: Goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: release
on:
push:
branches:
- "release"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
run: npx semantic-release --debug
22 changes: 22 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -w -extldflags '-static'

archives:
- format_overrides:
- goos: windows
format: zip
name_template: "terraform-provider-tigris_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

checksum:
name_template: 'checksums.txt'
6 changes: 6 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
branches:
- release
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/github"

0 comments on commit 3cd0fc2

Please sign in to comment.