diff --git a/.github/workflows/release-cosmoverse.yml b/.github/workflows/release-cosmoverse.yml new file mode 100644 index 0000000000..a0c16c8277 --- /dev/null +++ b/.github/workflows/release-cosmoverse.yml @@ -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/delete-tag-and-release@v0.2.0 + with: + tag_name: v0.0.0-cosmoverse + delete_release: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Bump version and push tag + uses: mathieudutour/github-tag-action@v6.0 + 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/cli@v0.0.0-cosmoverse! | 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 }} + diff --git a/.goreleaser.cosmoverse.yml b/.goreleaser.cosmoverse.yml new file mode 100644 index 0000000000..65c3ab568f --- /dev/null +++ b/.goreleaser.cosmoverse.yml @@ -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