memories/.github/workflows/release.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

name: release
2022-09-13 22:27:41 +00:00
on:
2022-09-13 22:39:09 +00:00
release:
types: [published]
env:
APP_NAME: memories
2022-09-13 22:27:41 +00:00
jobs:
2022-09-13 22:39:09 +00:00
publish:
2023-11-01 16:43:27 +00:00
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
2022-09-13 22:27:41 +00:00
runs-on: ubuntu-latest
permissions:
contents: write
steps:
2022-10-29 23:11:29 +00:00
- name: Checkout
uses: actions/checkout@v3
2022-09-13 22:27:41 +00:00
2022-10-29 23:11:29 +00:00
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
2022-09-13 22:27:41 +00:00
2022-10-29 23:11:29 +00:00
- name: Build
run: |
make dev-setup
2022-10-29 23:16:13 +00:00
make patch-external
2022-10-29 23:11:29 +00:00
make build-js-production
./scripts/bundle.sh
2022-09-13 22:27:41 +00:00
2022-10-29 23:11:29 +00:00
- name: Upload app tarball to release
uses: svenstaro/upload-release-action@v2
id: attach_to_release
with:
file: memories.tar.gz
asset_name: memories.tar.gz
tag: ${{ github.ref }}
overwrite: true
2022-09-13 22:39:09 +00:00
2022-10-29 23:11:29 +00:00
- name: Upload app to Nextcloud appstore
uses: R0Wi/nextcloud-appstore-push-action@v1
with:
app_name: ${{ env.APP_NAME }}
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
nightly: ${{ github.event.release.prerelease }}