Skip to content

Commit

Permalink
Automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
eel76 committed Nov 25, 2024
1 parent b3720ca commit b309c3b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
File renamed without changes.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: create release
on:
push:
tags:
- 'v*.*.*'
branches:
- main

jobs:
create-release:
runs-on: 'ubuntu-24.04'

permissions:
contents: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for tags

- name: Build package
uses: ./.github/actions/devcontainer
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: |
cmake -E make_directory build
cmake -B ./build -S .
cmake --build ./build --target package
- name: Set release version
id: version
run: |
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
files: |
./build/${{ github.event.repository.name }}*.zip

0 comments on commit b309c3b

Please sign in to comment.