From 978c7d282fd57cc16d14c0f921b5c5148f265956 Mon Sep 17 00:00:00 2001 From: Yeferson Licet <111311418+y3fers0n@users.noreply.github.com> Date: Tue, 28 May 2024 09:32:00 -0300 Subject: [PATCH] Adding github release --- .github/workflows/build.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65bf3822..9459a8e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - generate-releases: + npm-release: name: NPM Release runs-on: ubuntu-latest steps: @@ -27,10 +27,6 @@ jobs: - name: Set output id: vars run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: Set up Git user information - run: | - git config --global user.email "support@trustwallet.com" - git config --global user.name "Trust" - name: build packages run: | bun install @@ -40,6 +36,31 @@ jobs: bun run publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + github-release: + name: Github Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + - uses: oven-sh/setup-bun@v1 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: "https://npm.pkg.github.com" + scope: "@trustwallet" + - name: Set output + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: build packages + run: | + bun install + bun run build:packages + bun run test + bun run rename ${{ github.event.inputs.version || steps.vars.outputs.tag }} + bun run publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} permissions: actions: write contents: write