Skip to content

Commit

Permalink
Produce a "nightly" release on every push.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoehermann committed Sep 26, 2024
1 parent 263f644 commit 4a6c80a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ jobs:

build:
runs-on: windows-2022

permissions:
id-token: write
contents: write # This is required to create/push the new git tag

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -43,3 +48,21 @@ jobs:
with:
path: build/Release/libpresage.dll
name: libpresage.dll

- name: Prepare Release Info
run: |
$COMMIT_DATE = (git log -1 --date=format:'%Y%m%d' --format='%ad')
echo "COMMIT_DATE=$COMMIT_DATE" | Out-File -FilePath $Env:GITHUB_ENV -Append
[string](Get-Content "src\rust\Cargo.toml") -match 'presage = [^}]+rev = \"([a-f0-9]+)\"' | Out-Null
$PRESAGE_REVISION = $matches[1]
echo "PRESAGE_REVISION=$PRESAGE_REVISION" | Out-File -FilePath $Env:GITHUB_ENV -Append
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: build/Release/libpresage.dll
tag: nightly-${{ env.COMMIT_DATE }}-${{ env.PRESAGE_REVISION }}
#name: Nightly ${{ github.sha }}
allowUpdates: true
artifactErrorsFailBuild: true
makeLatest: true

0 comments on commit 4a6c80a

Please sign in to comment.