From 18c375e1a15f5dc4320beded816a150127e31842 Mon Sep 17 00:00:00 2001 From: Sebastian Tiedtke Date: Wed, 20 Nov 2024 15:37:39 -0800 Subject: [PATCH] Upgrade action --- .github/workflows/npm-publish.yml | 130 +++++++++++++++--------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 481c8a7..556933f 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,73 +1,73 @@ name: Manual NPM Publish on: - workflow_dispatch: - inputs: - releaseType: - description: "Release type - major, minor or patch" - required: true - type: choice - default: "patch" - options: - - patch - - minor - - major - additionalFlags: - description: "Additional flags for pre-releases, e.g. '--dry-run', '--preRelease=beta' or '--preRelease'" - required: false - type: string + workflow_dispatch: + inputs: + releaseType: + description: "Release type - major, minor or patch" + required: true + type: choice + default: "patch" + options: + - patch + - minor + - major + additionalFlags: + description: "Additional flags for pre-releases, e.g. '--dry-run', '--preRelease=beta' or '--preRelease'" + required: false + type: string env: - NPM_TOKEN: ${{secrets.NPM_TOKEN}} + NPM_TOKEN: ${{secrets.NPM_TOKEN}} jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Clone Repository - uses: actions/checkout@v2 - - name: Setup Node version - uses: actions/setup-node@v1 - with: - node-version: 18 - - name: Install dependencies - run: npm install - - name: Build Package - run: npm run build - env: - NODE_ENV: production - - name: Run tests - run: npm test - - name: Upload built package - uses: actions/upload-artifact@v2 - with: - name: compiled-package - path: build/ + test: + runs-on: ubuntu-latest + steps: + - name: Clone Repository + uses: actions/checkout@v2 + - name: Setup Node version + uses: actions/setup-node@v1 + with: + node-version: 18 + - name: Install dependencies + run: npm install + - name: Build Package + run: npm run build + env: + NODE_ENV: production + - name: Run tests + run: npm test + - name: Upload built package + uses: actions/upload-artifact@v4 + with: + name: compiled-package + path: build/ - release: - needs: test - runs-on: ubuntu-latest - steps: - - name: Clone Repository - uses: actions/checkout@v2 - - name: Setup Node version - uses: actions/setup-node@v2 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - - name: Setup Git - run: | - git config --global user.name "stateful-wombot" - git config --global user.email "christian+github-bot@stateful.com" - - name: Install dependencies - run: npm install - - name: Download built package - uses: actions/download-artifact@v2 - with: - name: compiled-package - path: build/ - - name: Release - run: npm run release:ci -- ${{github.event.inputs.releaseType}} ${{github.event.inputs.additionalFlags}} - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + release: + needs: test + runs-on: ubuntu-latest + steps: + - name: Clone Repository + uses: actions/checkout@v2 + - name: Setup Node version + uses: actions/setup-node@v2 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + - name: Setup Git + run: | + git config --global user.name "stateful-wombot" + git config --global user.email "christian+github-bot@stateful.com" + - name: Install dependencies + run: npm install + - name: Download built package + uses: actions/download-artifact@v2 + with: + name: compiled-package + path: build/ + - name: Release + run: npm run release:ci -- ${{github.event.inputs.releaseType}} ${{github.event.inputs.additionalFlags}} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}