Skip to content

Commit

Permalink
add manual contrib release step
Browse files Browse the repository at this point in the history
  • Loading branch information
timosachsenberg authored Feb 22, 2024
1 parent 5545518 commit 6cbd832
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on: [push]
on:
push:
workflow_dispatch: # This allows you to manually trigger the workflow from the GitHub UI

jobs:
build:
Expand Down Expand Up @@ -66,8 +68,34 @@ jobs:
rm -rf CMakeFiles
find . -maxdepth 1 -type f -not -name 'contrib_build.log' -delete
#TODO switch to V2 once it is released (this is to only upload relevant folders)
- uses: actions/upload-artifact@v3
- name: Configure Git for Tagging
if: github.event_name == 'workflow_dispatch'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
- name: Create and Push Tag
if: github.event_name == 'workflow_dispatch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME="release-$(date +'%Y%m%d%H%M%S')"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV # Save the tag name to an environment variable
git tag $TAG_NAME
git push origin $TAG_NAME
- name: Create Release
if: github.event_name == 'workflow_dispatch'
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }} # Explicitly specify the tag name for the release
files:
./contrib-build/contrib_build-${{runner.os}}.tar.gz

- uses: actions/upload-artifact@v4
with:
name: contrib-build-${{runner.os}}
path: contrib-build

0 comments on commit 6cbd832

Please sign in to comment.