Skip to content

CI Release

CI Release #53

Workflow file for this run

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 }}