Skip to content

Merge pull request #48 from ronati/dependabot/go_modules/github.com/h… #83

Merge pull request #48 from ronati/dependabot/go_modules/github.com/h…

Merge pull request #48 from ronati/dependabot/go_modules/github.com/h… #83

name: SemVer Release
on:
push:
branches:
- master
- beta
permissions:
contents: read # to fetch code
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment:
name: release
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
if: "!contains(github.event.head_commit.message, 'chore(release)')"
steps:
- name: 'Generate token'
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
# TODO: Run Go/Terraform tests to make sure we publish a working version
- name: Build app
run: make build
- name: Test app
run: make testacc
- name: Generate documentation
run: make doc
- name: Install dependencies
run: npm i
# - name: Check commit format
# # Checks commit from latest tag on this branch
# # run: npx commitlint --from $(git describe --tags) --to HEAD --verbose
# # TODO: replace this line with the one above once we published our first semver tag
# run: npx commitlint --from 3a7bc32 --to HEAD --verbose
- name: Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: npx semantic-release