From cadba1d89851fc43c90166fb17e8fb69bf5aaab7 Mon Sep 17 00:00:00 2001 From: Andy Bitz Date: Mon, 7 Nov 2022 23:42:11 +0100 Subject: [PATCH 1/2] Add publish workflow --- .github/workflows/publish.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..bcd99390 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,34 @@ +name: Publish Package + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Setup PNPM 7 + uses: pnpm/action-setup@v2.0.1 + with: + version: latest + - name: Setup Node 18 + uses: actions/setup-node@v2 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org/' + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Run all tests + run: pnpm compile + - name: Run all tests + run: pnpm test + - name: Publish + run: pnpm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} From f2372b2b61025d2dbd9e4ddb960b2cfabade1a59 Mon Sep 17 00:00:00 2001 From: Andy Bitz Date: Mon, 7 Nov 2022 23:48:42 +0100 Subject: [PATCH 2/2] Fix name --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index bcd99390..0069b4fa 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -24,7 +24,7 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install - - name: Run all tests + - name: Compile run: pnpm compile - name: Run all tests run: pnpm test