Skip to content

Release v0.38.0-prod #518

Release v0.38.0-prod

Release v0.38.0-prod #518

Workflow file for this run

name: Publish
on:
push:
branches:
# - dev
# - feat*
- build/ci*
- trigger-build
tags:
- 'v*'
defaults:
run:
shell: bash -ieo pipefail {0}
jobs:
setup:
name: Build
strategy:
matrix:
host: [Windows, macOS]
runs-on:
- self-hosted
- X64
- isolate
- ${{ matrix.host }}
# if: ${{ github.repository_owner == 'RabbyHub' }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Env Test
id: env-test
shell: bash
run: |
echo "whoami $(whoami)"
echo "shell is $(echo $0)"
echo "HOME is $HOME"
echo "USERPROFILE is $USERPROFILE"
echo "which node $(which node)"
echo "where npm $(npm config get prefix)"
# - name: Install Node and NPM
# uses: actions/setup-node@v1
# with:
# node-version: 16
# cache: npm
- name: Use NPM Token with organization read access
uses: heisenberg-2077/use-npm-token-action@v1
with:
token: '${{ secrets.NPM_AUTH_TOKEN }}'
- name: Install and build
shell: bash
run: |
npm i -g @debank/cli@latest;
npm i;
if [[ $GIT_REF_NAME =~ ^v[0-9]+\.[0-9]+\.[0-9]+-reg$ ]]; then
export buildchannel="reg";
export doupdatechangelog=1;
echo "[get_buildchannel] it's one reg version";
elif [[ $GIT_REF_NAME =~ ^v[0-9]+\.[0-9]+\.[0-9]+-prod$ ]]; then
export buildchannel="prod";
export doupdatechangelog=1;
echo "[get_buildchannel] it's one prod version";
else
unset doupdatechangelog;
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
security unlock-keychain -p ${{ secrets.KEYCHAIN_PASS }} ~/Library/Keychains/login.keychain-db
else
bash ./.github/workflows/fix-vars.sh
fi
# if [[ $GITHUB_REF == refs/tags/v* ]]; then
# else
# fi
# only update changelog on release
if [[ ! -z $doupdatechangelog ]]; then
bash ./scripts/release_changelog.sh
fi
bash ./scripts/release_desktop.sh
env:
KEYCHAIN_PASS: ${{ secrets.KEYCHAIN_PASS }}
RABBY_BUILD_BUCKET: ${{ secrets.RABBY_BUILD_BUCKET }}
RABBY_APPLE_TEAM_ID: ${{ secrets.RABBY_APPLE_TEAM_ID }}
RABBY_APPLE_ID: ${{ secrets.RABBY_APPLE_ID }}
RABBY_APPLE_ID_PASS: ${{ secrets.RABBY_APPLE_ID_PASS }}
RABBY_DESKTOP_CODE_SIGINING_PASS_PROD: ${{ secrets.RABBY_DESKTOP_CODE_SIGINING_PASS_PROD }}
RABBY_DESKTOP_CODE_SIGINING_CERT_FINGERPRINT: ${{ secrets.RABBY_DESKTOP_CODE_SIGINING_CERT_FINGERPRINT }}
RABBY_DESKTOP_KR_PWD: ${{ secrets.RABBY_DESKTOP_KR_PWD }}
RABBY_REALLY_COPY: ${{ vars.RABBY_REALLY_COPY }}
buildchannel: ${{ vars.buildchannel }}
LARK_CHAT_URL: ${{ secrets.LARK_CHAT_URL }}
LARK_CHAT_SECRET: ${{ secrets.LARK_CHAT_SECRET }}
# see more details on https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
GIT_ACTIONS_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GIT_COMMIT_URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
GIT_REF_NAME: ${{ github.ref_name }}
GIT_REF_URL: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }}
GITHUB_REF: ${{ github.ref }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TRIGGERING_ACTOR: ${{ github.triggering_actor }}
# - name: Publish releases
# env:
# # These values are used for auto updates signing
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# # This is used for uploading release assets to github
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# npm exec electron-builder -- --publish always --win --mac --linux