Skip to content

Release (Manual)

Release (Manual) #17

Workflow file for this run

name: Manual trigger
on:
workflow_dispatch:
inputs:
name:
description: "Semver - major, minor, patch"
default: "patch"
jobs:
semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # required for better experience using pre-releases
fetch-depth: '0'
# - name: Checkout go
# uses: actions/setup-go@v4
# with:
# go-version: '1.22' # The Go version to download (if necessary) and use.
# - name: Go version
# id: Version
# run: go version
# - name: Go download
# run: go mod download
# - name: Go test
# run: go test -v ./...
# continue-on-error: false
- name: Create release
run: |
echo "Hello ${{ github.event.inputs.name }}"
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.67.0
id: tagging #test4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
INITIAL_VERSION: 1.0.0
RELEASE_BRANCHES: master
DEFAULT_BUMP: ${{ github.event.inputs.name }}
PRERELEASE: false
DRY_RUN: true
VERBOSE: true
- name: Create local changes
run: |
echo ${{ steps.tagging.outputs.tag }} > version
- name: Create release
run: |
git config --global user.email "release-bot@tfswitch.com"
git config --global user.name "release-bot"
git commit -a -m "#{{ github.event.inputs.name }} - Setting semantic version"
echo "Hello ${{ github.event.inputs.name }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}