Skip to content

Commit

Permalink
chore: release ci issue
Browse files Browse the repository at this point in the history
  • Loading branch information
soring323 committed Sep 14, 2023
1 parent 7e3560c commit 47fb958
Showing 1 changed file with 50 additions and 17 deletions.
67 changes: 50 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,59 @@
# This workflow creates a release using goreleaser
# via the 'make release' command.

name: Create release
name: "Release"
# This workflow is useful if you want to automate the process of:
#
# a) Creating a new prelease when you push a new tag with a "v" prefix (version).
#
# This type of prerelease is meant to be used for production: alpha, beta, rc, etc. types of releases.
# After the prerelease is created, you need to make your changes on the release page at the relevant
# Github page and publish your release.
#
# b) Creating/updating the "latest" prerelease when you push to your default branch.
#
# This type of prelease is useful to make your bleeding-edge binaries available to advanced users.
#
# The workflow will not run if there is no tag pushed with a "v" prefix and no change pushed to your
# default branch.
on:
push:
tags:
- v*
permissions:
contents: write
branches:
- main
- develop

jobs:
release:
name: Create release
might_release:
name: "Publish Release"
runs-on: ubuntu-latest
steps:
- name: Check out repository code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.release_tag }}
- name: Make release
run: |
sudo rm -rf dist
make release

- name: Prepare Release Variables
id: vars
uses: ignite/cli/actions/release/vars@main

- name: Issue Release Assets
uses: sideprotocol/side/actions/cli@dev
if: ${{ steps.vars.outputs.should_release == 'true' }}
with:
args: chain build --release --release.prefix sided_${{ steps.vars.outputs.tag_name }} -t linux:amd64

- name: Delete the "latest" Release
uses: dev-drprasad/[email protected]
if: ${{ steps.vars.outputs.is_release_type_latest == 'true' }}
with:
tag_name: ${{ steps.vars.outputs.tag_name }}
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }}

- name: Publish the Release
uses: softprops/action-gh-release@v1
if: ${{ steps.vars.outputs.should_release == 'true' }}
with:
tag_name: ${{ steps.vars.outputs.tag_name }}
files: release/*
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }}

0 comments on commit 47fb958

Please sign in to comment.