changelog: 0.5.7 #6
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
name: main | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build, test and draft release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20.5' | |
- name: Install dependencies | |
run: .github/workflows/helpers/install-deps.sh | |
- name: Build web | |
run: ./web/app/make.sh all | |
- name: Build binaries | |
run: .github/workflows/helpers/build-bin.sh build/ all | |
- name: Run tests | |
run: .github/workflows/helpers/run-tests.sh build/notesium-linux-amd64 | |
- name: Generate release notes | |
if: startsWith(github.ref, 'refs/tags/') | |
run: .github/workflows/helpers/release-notes.sh ${{ github.ref }} > build/release-notes.md | |
- name: Create draft release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: ${{ github.ref_name }} | |
tag_name: ${{ github.ref_name }} | |
fail_on_unmatched_files: true | |
body_path: build/release-notes.md | |
files: | | |
build/checksums.txt | |
build/notesium-linux-amd64 | |
build/notesium-darwin-amd64 | |
build/notesium-windows-amd64.exe | |