Skip to content

all: Set changelog to v0.12.0 #36

all: Set changelog to v0.12.0

all: Set changelog to v0.12.0 #36

Workflow file for this run

name: Tag release
on:
push:
tags:
- 'v[0-9].[0-9]+.[0-9]+'
- 'v[0-9].[0-9]+.[0-9]+-rc[0-9]'
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Snapcraft
run: sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
- name: Create Snapcraft folders
run: |
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '~1.21'
- name: Download Go dependencies
run: go mod download
- name: Check for diff
run: make git.diff
- name: Determine date
id: date
run: echo "value=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
- name: Generate CHANGELOG reference
uses: actions/github-script@v7
id: changelog_reference
with:
result-encoding: string
script: |
const tag = context.ref.slice('refs/rev/v'.length);
const tagParts = tag.split('.');
require('fs').writeFileSync('/tmp/release-notes.md', `[Release notes](https://github.com/TheThingsNetwork/lorawan-stack-migrate/blob/${tag}/CHANGELOG.md#${tagParts[0]}${tagParts[1]}${tagParts[2]}---${{ steps.date.outputs.value }})`);
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: 'v1.18.2'
args: release --release-notes /tmp/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}