update actions for releases?

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-22 16:36:03 +01:00
parent 56c8085898
commit d3fe507002
3 changed files with 42 additions and 7 deletions

View File

@ -3,6 +3,7 @@ name: Nicolium CI
on:
push:
branches: [ "develop", "semistable" ]
tags: [ "v*" ]
pull_request:
branches: [ "develop" ]
@ -69,7 +70,15 @@ jobs:
working-directory: ./packages/nicolium/dist
run: zip -r ../nicolium.zip .
- name: Upload release zip artifact
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: nicolium-release-zip
path: packages/nicolium/nicolium.zip
- name: build
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
env:
NODE_ENV: production
working-directory: ./packages/nicolium
@ -79,14 +88,17 @@ jobs:
cp nicolium.zip dist/pl-fe.zip
- name: Build pl-api documentation
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: ./packages/pl-api
run: npx typedoc
- name: Copy pl-api documentation
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: ./packages/pl-api
run: cp docs ../nicolium/dist/pl-api-docs -r
- name: Create docs redirect
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: .
run: |
mkdir -p ./packages/nicolium/dist/docs
@ -96,11 +108,31 @@ jobs:
EOF
- name: Upload Github Pages artifact
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: packages/nicolium/dist
release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download release zip artifact
uses: actions/download-artifact@v4
with:
name: nicolium-release-zip
path: .
- name: Upload asset to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: nicolium.zip
generate_release_notes: true
deploy:
needs: build
if: github.ref == 'refs/heads/develop'