fix: re-enabling faucet e2e tests (#1403) #74
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
name: "Release" | |
on: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
BUILD_VERSION: "" | |
jobs: | |
release-changesets: | |
name: Release master or rc | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# need this to get full git-history/clone in order to build changelogs and check changesets | |
fetch-depth: 0 | |
# workaround to ensure force pushes to changeset branch use REPO_TOKEN owner's account | |
# see https://github.com/changesets/action/issues/70 | |
persist-credentials: false | |
- uses: FuelLabs/github-actions/setups/node@master | |
with: | |
node-version: 18.18.0 | |
pnpm-version: 8.15.7 | |
- name: Bump and Collect Version | |
run: | | |
pnpm changeset version | |
echo "BUILD_VERSION=$(pnpm -s packages:version)" >> $GITHUB_ENV | |
git reset --hard | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup git user (for changelog step) | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Create Release Pull Request | |
id: changesets | |
uses: FuelLabs/changesets-action@main | |
with: | |
publish: pnpm changeset tag | |
commit: "ci(changesets): versioning packages" | |
title: "ci(changesets): versioning packages" | |
createGithubReleases: aggregate | |
githubReleaseName: v${{ env.BUILD_VERSION }} | |
githubTagName: v${{ env.BUILD_VERSION }} | |
skipNpm: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | |
- name: Build Fuel Wallet | |
if: steps.changesets.outputs.published == 'true' | |
run: pnpm build:crx | |
env: | |
## increase node.js m memory limit for building | |
## with sourcemaps | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
- name: Build Fuel Wallet Development | |
if: steps.changesets.outputs.published == 'true' | |
run: pnpm build:crx | |
env: | |
VITE_CRX_RELEASE: false | |
VITE_CRX_NAME: "Fuel Wallet Development" | |
CRX_OUT: "dist-crx-dev" | |
APP_VERSION_POSTFIX: "-development" | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
- name: Upload artifacts to Sentry | |
if: steps.changesets.outputs.published == 'true' | |
run: | | |
pnpm sentry-cli sourcemaps inject --release ${{ env.BUILD_VERSION }} ./dist-crx | |
pnpm sentry-cli sourcemaps upload --release ${{ env.BUILD_VERSION }} ./dist-crx | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
working-directory: ./packages/app | |
- name: Attach Fuel Wallet to release | |
if: steps.changesets.outputs.published == 'true' | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: v${{ env.BUILD_VERSION }} | |
files: | | |
./packages/app/dist/*.zip |