Skip to content

Commit

Permalink
Merge pull request janhq#1767 from janhq/regression/combine-ci-pre-re…
Browse files Browse the repository at this point in the history
…lease-and-nightly

Combine 2 ci pipeline pre-release and nightly into one
  • Loading branch information
hiento09 authored Jan 25, 2024
2 parents 9f71ec2 + 8e28c2a commit c752e71
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 52 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/jan-electron-build-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Jan Build Electron App Nightly or Manual

on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'docs/**'
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 +33,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 +87,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 c752e71

Please sign in to comment.