-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.1 KB
/
onRelease.yml
File metadata and controls
39 lines (34 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Add CLI Installers to GitHub Release
env:
# Increase heap to keep Nitro/Vite SSR builds (editor) from OOMing while treeshaking.
NODE_OPTIONS: --max-old-space-size=4096
on:
release:
types: [released]
permissions:
contents: write
jobs:
build-artifacts:
if: startsWith(github.event.release.tag_name, 'powersync@')
uses: ./.github/workflows/buildArtifacts.yml
with:
retention-days: 1
publish-release-assets:
needs: [build-artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: release-assets
- name: Upload assets to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ github.event.release.tag_name }}"
files=$(find release-assets -type f \( -name "*.pkg" -o -name "*.exe" -o -name "*.deb" -o -name "*.tar.gz" -o -name "*.tar.xz" \))
if [ -z "$files" ]; then
echo "Error: No artifacts found to upload"
exit 1
fi
gh release upload "$tag" $files --clobber