Skip to content

Commit

Permalink
ci: add cosmoverse release (#2862)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz authored Sep 27, 2022
1 parent 8d4dbe0 commit 3a32e6b
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release-cosmoverse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release cosmoverse

on:
push:
branches:
- cosmoverse

jobs:
consecutiveness:
runs-on: ubuntu-latest
steps:
- uses: mktcode/consecutive-workflow-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

release-cosmoverse:
runs-on: ubuntu-latest
needs: [ consecutiveness ]
env:
working-directory: go/src/github.com/ignite/cli

steps:
- uses: actions/checkout@v2

- name: Delete the cosmoverse release
uses: dev-drprasad/[email protected]
with:
tag_name: v0.0.0-cosmoverse
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Bump version and push tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: v0.0.0-cosmoverse
tag_prefix: ""

- name: Upsert the cosmoverse release
uses: ncipollo/release-action@v1
with:
tag: v0.0.0-cosmoverse
name: cosmoverse
body: "Install and move the CLI to your bin directory: `curl https://get.ignite.com/[email protected]! | bash`"
prerelease: true

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Checkout
uses: actions/checkout@v2
with:
path: ${{ env.working-directory }}
fetch-depth: 0

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
workdir: ${{ env.working-directory }}
args: release --rm-dist --skip-validate -f .goreleaser.cosmoverse.yml
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

16 changes: 16 additions & 0 deletions .goreleaser.cosmoverse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
project_name: ignite
builds:
- main: ./ignite/cmd/ignite
ldflags:
- -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}}
goos:
- linux
- darwin
goarch:
- amd64
- arm64
changelog:
skip: true
release:
prerelease: true
name_template: cosmoverse

0 comments on commit 3a32e6b

Please sign in to comment.