Skip to content

🔧 chore: update test #14 #145

🔧 chore: update test #14

🔧 chore: update test #14 #145

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: VoipKit workflow
on:
push:
branches: ["master"]
tags:
- "v*"
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
if: startsWith(github.ref, 'refs/tags/v') # Only run this job when a valid tag is pushed
steps:
- name: Check if tag exists
id: check_tag
run: |
if [ -n "$GITHUB_REF" ]; then
TAG=${GITHUB_REF#refs/tags/}
echo "TAG=${TAG}" >> $GITHUB_ENV
else
echo "TAG=" >> $GITHUB_ENV
fi
shell: bash
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
body: |
:gem: released new version ${{ env.TAG }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}