Skip to content

Commit

Permalink
Combine 2 ci pipeline pre-release and nightly into one for correcting…
Browse files Browse the repository at this point in the history
… build number nightly
  • Loading branch information
hiento09 committed Jan 25, 2024
1 parent 9f71ec2 commit f73e738
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 52 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/jan-electron-build-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Jan Build Electron App Nightly or Manual

on:
push:
branches:
- main
schedule:
- cron: '0 20 * * 2,3,4' # At 8 PM UTC on Tuesday, Wednesday, and Thursday, which is 3 AM UTC+7
workflow_dispatch:
Expand All @@ -27,8 +30,16 @@ jobs:
echo "::set-output name=public_provider::${{ github.event.inputs.public_provider }}"
echo "::set-output name=ref::${{ github.ref }}"
else
echo "::set-output name=public_provider::cloudflare-r2"
echo "::set-output name=ref::refs/heads/dev"
if [ ${{ github.event_name == 'schedule' }} ]; then
echo "::set-output name=public_provider::cloudflare-r2"
echo "::set-output name=ref::refs/heads/dev"
else if [ ${{ github.event_name == 'push' }} ]; then
echo "::set-output name=public_provider::cloudflare-r2"
echo "::set-output name=ref::${{ github.ref }}"
else
echo "::set-output name=public_provider::none"
echo "::set-output name=ref::${{ github.ref }}"
fi
fi
# Job create Update app version based on latest release tag with build number and save to output
get-update-version:
Expand Down Expand Up @@ -73,6 +84,17 @@ jobs:
push_to_branch: dev
new_version: ${{ needs.get-update-version.outputs.new_version }}

noti-discord-pre-release-and-update-url-readme:
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider]
secrets: inherit
if: github.event_name == 'push'
uses: ./.github/workflows/template-noti-discord-and-update-url-readme.yml
with:
ref: refs/heads/dev
build_reason: Pre-release
push_to_branch: dev
new_version: ${{ needs.get-update-version.outputs.new_version }}

noti-discord-manual-and-update-url-readme:
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider]
secrets: inherit
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/jan-electron-build-pre-release.yml

This file was deleted.

0 comments on commit f73e738

Please sign in to comment.