Skip to content

Commit

Permalink
ci-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdknight committed Feb 18, 2024
1 parent 9751b44 commit fb490da
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
name: Build

on: push
on:
push:
branches:
- main
paths:
- '.github/workflows/build.yml'
- 'scripts/**'
- 'src/**'
- 'CMakeLists.txt'
- '*.cmake'
pull_request:
branches:
- main
paths:
- '.github/workflows/build.yml'
- 'scripts/**'
- 'src/**'
- 'CMakeLists.txt'
- '*.cmake'
workflow_dispatch:

jobs:
build:
Expand All @@ -11,4 +30,4 @@ jobs:
mkdir output
cd output
cmake ..
cmake --build . --config Release
cmake --build .
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release
permissions: read-all

on: push

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir output
cd output
cmake ..
cmake --build . --config Release
- name: Generate hashes
run: |
cd output/Release
sha256sum -b * >SHA256SUMS
cat SHA256SUMS
- name: Store release artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: output/Release/

draft-release:
name: Prepare GitHub Draft Release
runs-on: ubuntu-latest
environment: release
needs:
- build
permissions:
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Acquire release artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts
path: artifacts/

- name: Prepare GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release create --draft --verify-tag
'${{ github.ref_name }}' artifacts/**

0 comments on commit fb490da

Please sign in to comment.