CI Release #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_run: | |
workflows: ["CI Scan"] | |
types: | |
- completed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20 | |
- name: Release | |
id: semrel | |
uses: go-semantic-release/action@v1 | |
with: | |
changelog-generator-opt: "emojis=true" | |
changelog-file: "CHANGELOG.md" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
echo "Version: ${{ steps.semrel.outputs.version }}" | |
echo "Major Version: ${{ steps.semrel.outputs.version_major }}" | |
echo "Minor Version: ${{ steps.semrel.outputs.version_minor }}" | |
echo "Patch Version: ${{ steps.semrel.outputs.version_patch }}" | |
echo "Changelog: ${{ steps.semrel.outputs.changelog }}" | |
- name: Publish to pkg.go.dev | |
if: steps.semrel.outputs.version != '' | |
run: GOPROXY=proxy.golang.org go list -m github.com/imusmanmalik/randomizer@v${{ steps.semrel.outputs.version }} |