Skip to content

Commit

Permalink
[CP-XXX] Enhancements for Mudita Center Release Process - pre-product…
Browse files Browse the repository at this point in the history
…ion env (#1528)
  • Loading branch information
dkarski authored Oct 28, 2023
2 parents 7d132ae + f0ae463 commit d2e6afe
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ GITHUB_ACCESS_TOKEN=
# [Optional] Name of the repository from which the application retrieves update packages. It is crucial for the application update process, enabling the determination of the update source.
RELEASES_REPOSITORY_NAME=

# [Optional] enable pre release for update process. Disabledd by default, set "1" to enable
PRERELEASES_ENABLED=

# [Optional] client id of the Microsoft Outlook application used for calendars and contacts
LOGIN_MICROSOFT_ONLINE_CLIENT_ID=

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nexus-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
MUDITA_CENTER_SERVER_URL: ${{ secrets.MUDITA_CENTER_SERVER_URL }}
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
name: Mudita Center v${{ env.GITTAG }}
repository: mudita/mudita-center-internal-releases
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
prerelease: true
draft: true
- name: Push artifacts to GitHub
id: upload_assets
uses: actions/upload-artifact@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nexus-pre-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
MUDITA_CENTER_SERVER_URL: ${{ secrets.MUDITA_CENTER_SERVER_URL }}
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
Expand Down Expand Up @@ -92,6 +93,7 @@ jobs:
tag_name: ${{ env.GITTAG }}
repository: mudita/mudita-center-internal-releases
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
prerelease: true
- name: Push artifacts to github
id: upload_assets
uses: actions/upload-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nexus-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
MUDITA_CENTER_SERVER_URL: ${{ secrets.MUDITA_CENTER_SERVER_URL }}
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/__deprecated__/main/autoupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const mockAutoupdate = (win: BrowserWindow): void => {

const token = process.env.GITHUB_ACCESS_TOKEN
const repo = process.env.RELEASES_REPOSITORY_NAME
const prereleaseEnabled = process.env.PRERELEASES_ENABLED === "1"

export default (win: BrowserWindow): void => {
autoUpdater.setFeedURL({
Expand All @@ -42,6 +43,7 @@ export default (win: BrowserWindow): void => {
owner: "Mudita",
})
autoUpdater.logger = logger
autoUpdater.allowPrerelease = prereleaseEnabled
autoUpdater.autoDownload = false
autoUpdater.autoInstallOnAppQuit = false

Expand Down

0 comments on commit d2e6afe

Please sign in to comment.