Skip to content

Commit 3a32e6b

Browse files
authored
ci: add cosmoverse release (#2862)
1 parent 8d4dbe0 commit 3a32e6b

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release cosmoverse
2+
3+
on:
4+
push:
5+
branches:
6+
- cosmoverse
7+
8+
jobs:
9+
consecutiveness:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: mktcode/consecutive-workflow-action@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
16+
release-cosmoverse:
17+
runs-on: ubuntu-latest
18+
needs: [ consecutiveness ]
19+
env:
20+
working-directory: go/src/github.com/ignite/cli
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Delete the cosmoverse release
26+
uses: dev-drprasad/[email protected]
27+
with:
28+
tag_name: v0.0.0-cosmoverse
29+
delete_release: true
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Bump version and push tag
34+
uses: mathieudutour/[email protected]
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
custom_tag: v0.0.0-cosmoverse
38+
tag_prefix: ""
39+
40+
- name: Upsert the cosmoverse release
41+
uses: ncipollo/release-action@v1
42+
with:
43+
tag: v0.0.0-cosmoverse
44+
name: cosmoverse
45+
body: "Install and move the CLI to your bin directory: `curl https://get.ignite.com/[email protected]! | bash`"
46+
prerelease: true
47+
48+
- name: Set up Go
49+
uses: actions/setup-go@v3
50+
with:
51+
go-version: 1.18
52+
53+
- name: Checkout
54+
uses: actions/checkout@v2
55+
with:
56+
path: ${{ env.working-directory }}
57+
fetch-depth: 0
58+
59+
- name: Run GoReleaser
60+
uses: goreleaser/goreleaser-action@v2
61+
with:
62+
workdir: ${{ env.working-directory }}
63+
args: release --rm-dist --skip-validate -f .goreleaser.cosmoverse.yml
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
66+

.goreleaser.cosmoverse.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
project_name: ignite
2+
builds:
3+
- main: ./ignite/cmd/ignite
4+
ldflags:
5+
- -s -w -X github.com/ignite/cli/ignite/version.Version={{.Tag}} -X github.com/ignite/cli/ignite/version.Date={{.Date}} -X github.com/ignite/cli/ignite/version.Head={{.FullCommit}}
6+
goos:
7+
- linux
8+
- darwin
9+
goarch:
10+
- amd64
11+
- arm64
12+
changelog:
13+
skip: true
14+
release:
15+
prerelease: true
16+
name_template: cosmoverse

0 commit comments

Comments
 (0)