-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from m-triassi/13-build-on-release
major(release): Add automated build pipeline
- Loading branch information
Showing
6 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Generate release-artifacts | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
generate: | ||
name: Generate cross-platform builds | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set-up Golang | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '^1.21.3' | ||
cache: true | ||
cache-dependency-path: go.sum | ||
|
||
- name: Generate changelog and tag release | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
output-file: CHANGELOG.md | ||
input-file: CHANGELOG.md | ||
fallback-version: 0.0.0 | ||
skip-version-file: true | ||
skip-commit: true | ||
git-push: false | ||
skip-tag: true | ||
|
||
- name: Write changelog to temp file for goreleaser | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
run: echo "${{ steps.changelog.outputs.clean_changelog }}" > ${{ runner.temp }}/CHANGELOG.md | ||
|
||
- name: Commit release | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
run: | | ||
git config user.name "Massimo Triassi" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m "chore(release): ${{ steps.changelog.outputs.tag }}" | ||
- name: Tag commit | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
run: git tag ${{ steps.changelog.outputs.tag }} | ||
|
||
- name: Push changelog | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
run: | | ||
git push origin main | ||
- name: Release new CLI version | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
bin | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
project_name: wowforge-cli | ||
builds: | ||
- dir: . | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -X "main.version=v{{ trimprefix .Version "v" }}" | ||
archives: | ||
- format: tar.gz | ||
wrap_in_directory: false | ||
checksum: | ||
name_template: "checksums.txt" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs" | ||
- "^test" | ||
- "^chore" | ||
- "^ci" | ||
brews: | ||
- name: wowforge-cli | ||
repository: | ||
owner: m-triassi | ||
name: homebrew-public | ||
homepage: "https://github.com/m-triassi/wowforge-cli" | ||
description: "Easily add and update addons for your World of Warcraft installation" | ||
license: "MIT" | ||
nfpms: | ||
- package_name: wowforge-cli | ||
file_name_template: "{{ .ConventionalFileName }}" | ||
vendor: m-triassi | ||
homepage: https://github.com/m-triassi/wowforge-cli | ||
description: |- | ||
Easily add and update addons for your World of Warcraft installation | ||
license: MIT | ||
maintainer: Massimo Triassi <[email protected]> | ||
formats: | ||
- deb | ||
- apk | ||
- rpm | ||
- archlinux | ||
dependencies: | ||
- git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog | ||
|
||
All notable changes to `wowforge-cli` will be documented in this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters