diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 98149d2..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: Publish NPM package - -on: - workflow_dispatch: - release: - types: [created] - -env: - TOKEN_LISTS_ACTIONS_OR_CI_BUILD: true - DAPP_RADAR_PROJECT_ID: ${{ secrets.DAPP_RADAR_PROJECT_ID }} - DAPP_RADAR_API_KEY: ${{ secrets.DAPP_RADAR_API_KEY }} - -jobs: - publish-npm: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - - run: brew install librsvg libimagequant pkg-config - - run: npm install -g yarn npm - - run: yarn --version - - run: yarn - - run: yarn start - - run: npm run publish-token-package - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/solana-tokenlist.yml b/.github/workflows/solana-tokenlist.yml index c998c8f..1f8d7c8 100644 --- a/.github/workflows/solana-tokenlist.yml +++ b/.github/workflows/solana-tokenlist.yml @@ -18,6 +18,7 @@ jobs: - uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} + - name: Extract branch name shell: bash run: echo "GITHUB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT @@ -42,16 +43,17 @@ jobs: SOLANA_MAINNET_RPC_URL: ${{ secrets.SOLANA_MAINNET_RPC_URL }} TRUSTED_TOKEN_LIST_URL: https://cdn.jsdelivr.net/gh/brave/token-lists@${{ steps.extract_branch.outputs.GITHUB_BRANCH }}/data/solana/trusted-tokenlist.json - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Update Solana UTL - file_pattern: 'data/solana/tokenlist.json' - - name: 'Bump patch version' run: npm version patch - run: yarn start + # Commit after yarn start + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Update Solana UTL + file_pattern: 'data/ build/' + - run: git push - run: npm run publish-token-package