Skip to content

ci: permissions write #4

ci: permissions write

ci: permissions write #4

name: Release on Tag Push
on:
push:
tags:
- "v*"
env:
BUILD_TYPE: Release
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure dependencies
run: |
git submodule init
git submodule update
sudo apt-get update
sudo apt-get install libgit2-dev
- name: Build
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package
run: |
mkdir -p ${{github.workspace}}/release
cp ${{github.workspace}}/build/src/today ${{github.workspace}}/release
cd ${{github.workspace}}/release
tar -czvf today.tar.gz today
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ${{github.workspace}}/release/today.tar.gz