Ole/prepare release (#32) #23
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
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json | |
name: Build and Release thesis | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
build_release_thesis: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
lfs: true | |
- name: Install Nix | |
uses: cachix/install-nix-action@V28 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: Build Thesis | |
run: nix -Lv build .#default | |
- name: Create initial tag | |
run: | | |
if [ -z "$(git tag -l 'v*')" ]; then | |
git tag v0.0.0 | |
fi | |
- name: Bump version and push tag | |
id: bump | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DEFAULT_BUMP: 'patch' | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ steps.bump.outputs.new_tag }} | |
name: Version ${{ steps.bump.outputs.new_tag }} | |
draft: false | |
prerelease: false | |
files: | | |
./result/thesis.pdf |