-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: GH actions for goreleaser, changelog reminder, and backport (#48)
- Loading branch information
1 parent
0ce9d57
commit b053ac8
Showing
9 changed files
with
198 additions
and
4 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,38 @@ | ||
# Adapted from https://github.com/marketplace/actions/backporting | ||
# | ||
# Usage: | ||
# - Let's say you want to backport a pull request on a branch named `production`. | ||
# - Then label it with `backport production`. | ||
# - That's it! When the pull request gets merged, it will be backported to | ||
# the `production` branch. If the pull request cannot be backported, a comment | ||
# explaining why will automatically be posted. | ||
# | ||
# Note: multiple backport labels can be added. For example, if a pull request | ||
# has the labels `backport staging` and `backport production` it will be | ||
# backported to both branches: `staging` and `production`. | ||
name: Backport | ||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
- labeled | ||
|
||
jobs: | ||
backport: | ||
name: Backport | ||
runs-on: ubuntu-latest | ||
# Only react to merged PRs for security reasons. | ||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. | ||
if: > | ||
github.event.pull_request.merged | ||
&& ( | ||
github.event.action == 'closed' | ||
|| ( | ||
github.event.action == 'labeled' | ||
&& contains(github.event.label.name, 'backport') | ||
) | ||
) | ||
steps: | ||
- uses: tibdex/backport@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Changelog Reminder | ||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
changelog_reminder: | ||
uses: babylonlabs-io/.github/.github/workflows/[email protected] | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
uses: babylonlabs-io/.github/.github/workflows/[email protected] | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ | |
main | ||
tmp/ | ||
build/ | ||
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,73 @@ | ||
project_name: btc-staker | ||
|
||
builds: | ||
- id: stakerd-linux-amd64 | ||
main: ./cmd/stakerd/main.go | ||
binary: stakerd | ||
hooks: | ||
pre: | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/libwasmvm_muslc.x86_64.a | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- GO111MODULE=on | ||
flags: | ||
- -mod=readonly | ||
- -trimpath | ||
tags: | ||
- netgo | ||
- osusergo | ||
|
||
- id: stakercli-linux-amd64 | ||
main: ./cmd/stakercli/main.go | ||
binary: stakercli | ||
hooks: | ||
pre: | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/libwasmvm_muslc.x86_64.a | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- GO111MODULE=on | ||
flags: | ||
- -mod=readonly | ||
- -trimpath | ||
tags: | ||
- netgo | ||
- osusergo | ||
|
||
archives: | ||
- id: zipped | ||
builds: | ||
- stakerd-linux-amd64 | ||
- stakercli-linux-amd64 | ||
name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
format: tar.gz | ||
files: | ||
- none* | ||
- id: binaries | ||
builds: | ||
- stakerd-linux-amd64 | ||
- stakercli-linux-amd64 | ||
name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
format: binary | ||
files: | ||
- none* | ||
|
||
checksum: | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" | ||
algorithm: sha256 | ||
|
||
release: | ||
github: | ||
owner: babylonlabs-io | ||
name: btc-staker | ||
|
||
# Docs: https://goreleaser.com/customization/changelog/ | ||
changelog: | ||
disable: true | ||
|
||
dist: 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
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