Skip to content

Commit

Permalink
add assets to releases (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
DNKpp authored Jun 17, 2024
1 parent df9f679 commit 1b35cf9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/generate_amalgamated_header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,28 @@ jobs:
- name: Upload header
uses: actions/upload-artifact@v4
with:
name: amalgamated-header
path: build/tools/amalgamate-headers/mimic++-amalgamated.hpp

release-amalgamated-header:
runs-on: ubuntu-latest
needs: amalgamate-header
if: ${{ github.event_name == 'release' }}

# this is required for the asset attachment
permissions:
contents: write

steps:
- uses: actions/download-artifact@v4
with:
name: amalgamated-header
path: ./header

- name: attach release assets
uses: ncipollo/release-action@v1
with:
artifacts: "header/mimic++-amalgamated.hpp"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true
32 changes: 31 additions & 1 deletion .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [released]

jobs:
docs:
create-documentation:
runs-on: ubuntu-latest
container:
image: ghcr.io/dnkpp/gcc:14
Expand Down Expand Up @@ -59,3 +59,33 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/html
publish_branch: dev-gh-pages

release-documentation:
runs-on: ubuntu-latest
needs: create-documentation
if: ${{ github.event_name == 'release' }}

# this is required for the asset attachment
permissions:
contents: write

steps:
- uses: actions/download-artifact@v4
with:
name: HTML-Documentation
path: ./documentation

- name: zip documentation
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: "documentation.zip"
path: ./documentation

- name: attach release assets
uses: ncipollo/release-action@v1
with:
artifacts: "documentation.zip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true

0 comments on commit 1b35cf9

Please sign in to comment.