Bump version to 1.3.2 #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow increments the minor version | |
# when there is a push to the main branch. It | |
# also creates a new release for the tag. | |
# | |
# It does not run if the commit has been tagged, | |
# so that it doesn't get in to an endless loop | |
# when a tagged commit gets pushed. | |
on: | |
push: | |
tags: | |
# Tags that look like a semantic version | |
- "[0-9]+.[0-9]+.[0-9]+*" | |
name: Release new version | |
jobs: | |
increment_minor_version: | |
env: | |
FRMC_VERSION: ${{ github.ref_name }} | |
GOOS: windows | |
GOARCH: amd64 | |
PROMETHEUS_VERSION: 2.27.1 | |
ZIP_FILENAME: FicsitRemoteMonitoringCompanion-v${{ github.ref_name }} | |
name: Increment minor version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.22.0' | |
- name: Compile go release | |
working-directory: ./Companion | |
run: | | |
mkdir ${ZIP_FILENAME} | |
go build -ldflags="-X 'main.Version=${FRMC_VERSION}'" -o ${ZIP_FILENAME}/Companion.exe main.go | |
- name: download prometheus | |
working-directory: ./Companion/${{env.ZIP_FILENAME}} | |
run: | | |
curl -s -o prometheus.tar.gz -L https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.windows-amd64.tar.gz | |
tar -zxvf prometheus.tar.gz | |
mv prometheus-${PROMETHEUS_VERSION}.windows-amd64 prometheus | |
mv ../prometheus.yml ./prometheus/prometheus.yml | |
rm prometheus.tar.gz | |
- name: build map | |
working-directory: ./map | |
run: | | |
npm install | |
npm run compile | |
mkdir -p ../Companion/${ZIP_FILENAME}/map/ | |
cp -Rf index.html map-16k.png vendor img js ../Companion/${ZIP_FILENAME}/map/ | |
- name: Bundle release | |
working-directory: ./Companion | |
run: | | |
zip -9 -y -r -q FicsitRemoteMonitoringCompanion-v${FRMC_VERSION}.zip ./${ZIP_FILENAME} | |
- name: Generate release notes | |
run: | | |
curl -s -o git-chglog.tar.gz -L https://github.com/git-chglog/git-chglog/releases/download/v0.15.4/git-chglog_0.15.4_linux_amd64.tar.gz | |
tar -zxvf git-chglog.tar.gz git-chglog | |
./git-chglog -c "./.chglog/config.yml" -t "./.chglog/CHANGELOG.tpl.md" -o "Changelog.md" "${FRMC_VERSION}..${FRMC_VERSION}" | |
cat Changelog.md InstallationInstructions.md > ReleaseNotes.md | |
- name: Upload assets | |
id: upload_assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create "${FRMC_VERSION}" --notes-file ReleaseNotes.md "./Companion/FicsitRemoteMonitoringCompanion-v${FRMC_VERSION}.zip" |