diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 6f1fcb0..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Build CLI - -on: - workflow_dispatch: - -jobs: - compile: - name: Compile - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-go@v3 - with: - go-version: '>=1.18.0' - - - name: Compile - run: | - VERSION="0.$(git rev-list --count HEAD).0" - echo "version=$VERSION" >> $GITHUB_ENV - sed -i "s/0.0.0/${VERSION}/" main.go - bash build-all.sh $VERSION - - - name: Release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release create v${{ env.version }} --generate-notes ./bin/*.zip ./bin/*_SHA256SUMS diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a4c4eb8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Compile and Release + +on: + workflow_dispatch: + inputs: + version: + type: string + description: Version for new release + required: true + default: 0.0.0 + +jobs: + compile: + name: Compile and Release + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: '>=1.18.0' + + - name: Compile and Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION="${{ github.event.inputs.version }}" + sed -i "s/0.0.0/${VERSION}/" main.go + bash build-all.sh $VERSION + gh release create v$VERSION --generate-notes ./bin/*.zip ./bin/*_SHA256SUMS