Skip to content

Commit

Permalink
ci: generate & publish flatpak sources during desktop release
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Nov 20, 2024
1 parent 950028e commit 97a75d9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/desktop.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,26 @@ jobs:
files: ./notesnook_build_v${{ steps.app_metadata.outputs.app_version }}.zip
prerelease: ${{ endsWith(steps.app_metadata.outputs.app_version, '-beta') }}

- name: Generate flatpak sources
if: inputs.publish-github && inputs.build-linux
run: |
sudo apt-get install -y flatpak flatpak-builder pipx
git clone https://github.com/flatpak/flatpak-builder-tools.git /tmp/flatpak-builder-tools
cd /tmp/flatpak-builder-tools/node
pipx install .
cd -
node scripts/generate-sources.mjs
- name: Upload flatpak sources
uses: softprops/action-gh-release@v1
if: inputs.publish-github && inputs.build-linux
with:
draft: true
name: Notesnook Desktop v${{ steps.app_metadata.outputs.app_version }}
tag_name: v${{ steps.app_metadata.outputs.app_version }}
files: ./generated-sources.json
prerelease: ${{ endsWith(steps.app_metadata.outputs.app_version, '-beta') }}

build-macos:
name: Build for macOS
needs: build
Expand Down
4 changes: 4 additions & 0 deletions scripts/generate-sources.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const directoryTree = {
"package.json": ["packages", "sodium", "package.json"],
"package-lock.json": ["packages", "sodium", "package-lock.json"]
},
intl: {
"package.json": ["packages", "intl", "package.json"],
"package-lock.json": ["packages", "intl", "package-lock.json"]
},
crypto: {
"package.json": ["packages", "crypto", "package.json"],
"package-lock.json": ["packages", "crypto", "package-lock.json"]
Expand Down

0 comments on commit 97a75d9

Please sign in to comment.