Skip to content

bump: version 0.4.8 → 0.4.9 #9

bump: version 0.4.8 → 0.4.9

bump: version 0.4.8 → 0.4.9 #9

Workflow file for this run

name: Run tests and create a new GitHub release
on:
workflow_dispatch: {}
push:
tags: '[0-9].[0-9].[0-9]'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: Test
run: |
git config --global user.email "gommitizen@localhost"
git config --global user.name "gommitizen"
go test -v ./...
- name: Determine tag
run: |
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Create release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
const response = await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.RELEASE_TAG,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.RELEASE_TAG,
});
core.exportVariable('RELEASE_ID', response.data.id);
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
} catch (error) {
core.setFailed(error.message);
}