ci: Configure nightly deployment

This commit is contained in:
Elian Doran 2024-10-11 22:07:22 +03:00
parent 6e64cab2d4
commit b44c2f5ebf
No known key found for this signature in database

View File

@ -5,10 +5,12 @@ on:
- cron: '0 2 * * *' # run at 2 AM UTC - cron: '0 2 * * *' # run at 2 AM UTC
# This can be used to allow manually triggering nightlies from the web interface # This can be used to allow manually triggering nightlies from the web interface
workflow_dispatch: workflow_dispatch:
env:
GITHUB_UPLOAD_URL: https://uploads.github.com/repos/TriliumNext/Notes/releases/179589950/assets{?name,label}
GITHUB_RELEASE_ID: 179589950
jobs: jobs:
nightly-electron: nightly-electron:
name: Deploy nightly name: Deploy nightly
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -23,7 +25,7 @@ jobs:
- name: windows - name: windows
image: windows-latest image: windows-latest
extension: exe extension: exe
runs-on: ${{ matrix.os.image }} runs-on: ${{ matrix.os.image }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up node & dependencies - name: Set up node & dependencies
@ -71,16 +73,16 @@ jobs:
- name: Deploy release - name: Deploy release
uses: WebFreak001/deploy-nightly@v3.1.0 uses: WebFreak001/deploy-nightly@v3.1.0
with: with:
# upload_url: # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part upload_url: ${{ env.GITHUB_UPLOAD_URL }}
# release_id: # same as above (id can just be taken out the upload_url, it's used to find old releases) release_id: ${{ env.GITHUB_RELEASE_ID }}
asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip # path to archive to upload asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip # path to archive to upload
asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/zip # required by GitHub API asset_content_type: application/zip # required by GitHub API
- name: Deploy installer release - name: Deploy installer release
uses: WebFreak001/deploy-nightly@v3.1.0 uses: WebFreak001/deploy-nightly@v3.1.0
with: with:
# upload_url: # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part upload_url: ${{ env.GITHUB_UPLOAD_URL }}
# release_id: # same as above (id can just be taken out the upload_url, it's used to find old releases) release_id: ${{ env.GITHUB_RELEASE_ID }}
asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }} # path to archive to upload asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }} # path to archive to upload
asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.${{ matrix.os.extension }} # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.${{ matrix.os.extension }} # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/zip # required by GitHub API asset_content_type: application/zip # required by GitHub API
@ -115,8 +117,8 @@ jobs:
- name: Deploy release - name: Deploy release
uses: WebFreak001/deploy-nightly@v3.1.0 uses: WebFreak001/deploy-nightly@v3.1.0
with: with:
# upload_url: # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part upload_url: ${{ env.GITHUB_UPLOAD_URL }}
# release_id: # same as above (id can just be taken out the upload_url, it's used to find old releases) release_id: ${{ env.GITHUB_RELEASE_ID }}
asset_path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz # path to archive to upload asset_path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz # path to archive to upload
asset_name: TriliumNextNotes-linux-x64-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash asset_name: TriliumNextNotes-linux-x64-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/zip # required by GitHub API asset_content_type: application/zip # required by GitHub API