-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
24,786 additions
and
6,177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ inputs: | |
default: "[email protected]" | ||
NODE_VERSION: | ||
type: string | ||
default: "14.x" | ||
default: "16.x" | ||
VERBOSE: | ||
type: string | ||
default: "true" | ||
|
@@ -46,58 +46,6 @@ runs: | |
run: choco install yq | ||
if: runner.os == 'Windows' | ||
|
||
# FIXME: resinci-deploy is not actively maintained | ||
# https://github.com/product-os/resinci-deploy | ||
- name: Checkout resinci-deploy | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: product-os/resinci-deploy | ||
token: ${{ fromJSON(inputs.secrets).FLOWZONE_TOKEN }} | ||
path: resinci-deploy | ||
|
||
- name: Build and install resinci-deploy | ||
shell: bash --noprofile --norc -eo pipefail -x {0} | ||
run: | | ||
set -ea | ||
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x | ||
runner_os="$(echo "${RUNNER_OS}" | tr '[:upper:]' '[:lower:]')" | ||
rm -rf ../resinci-deploy && mv resinci-deploy .. | ||
pushd ../resinci-deploy && npm ci && npm link && popd | ||
if [[ $runner_os =~ linux|macos ]]; then | ||
chmod +x "$(dirname "$(which node)")/resinci-deploy" && which resinci-deploy | ||
fi | ||
# FIXME: store sentry workflow is not documented | ||
# https://github.com/product-os/resinci-deploy/blob/master/lib/sentry.ts | ||
# https://github.com/getsentry/sentry-cli | ||
# https://docs.sentry.io/api/projects/create-a-new-client-key/ | ||
- name: Generate Sentry DSN | ||
id: sentry | ||
shell: bash --noprofile --norc -eo pipefail -x {0} | ||
run: | | ||
set -ea | ||
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x | ||
branch="$(echo '${{ github.event.pull_request.head.ref }}' | sed 's/[^[:alnum:]]/-/g')" | ||
stdout="$(resinci-deploy store sentry \ | ||
--branch="${branch}" \ | ||
--name="$(jq -r '.name' package.json)" \ | ||
--team="$(yq e '.sentry.team' repo.yml)" \ | ||
--org="$(yq e '.sentry.org' repo.yml)" \ | ||
--type="$(yq e '.sentry.type' repo.yml)")" | ||
echo "dsn=$(echo "${stdout}" | tail -n 1)" >> $GITHUB_OUTPUT | ||
env: | ||
SENTRY_TOKEN: ${{ fromJSON(inputs.secrets).SENTRY_AUTH_TOKEN }} | ||
|
||
# https://www.electron.build/code-signing.html | ||
# https://github.com/Apple-Actions/import-codesign-certs | ||
- name: Import Apple code signing certificate | ||
|
@@ -171,8 +119,8 @@ runs: | |
for target in ${TARGETS}; do | ||
electron-builder ${ELECTRON_BUILDER_OS} ${target} ${ARCHITECTURE_FLAGS} \ | ||
--c.extraMetadata.analytics.sentry.token='${{ steps.sentry.outputs.dsn }}' \ | ||
--c.extraMetadata.analytics.mixpanel.token='balena-etcher' \ | ||
--c.extraMetadata.analytics.sentry.token='https://[email protected].sentry.io/4504451487301632' \ | ||
--c.extraMetadata.analytics.amplitude.token='balena-etcher' \ | ||
--c.extraMetadata.packageType="${target}" | ||
find dist -type f -maxdepth 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14 | ||
16 |
Oops, something went wrong.