From c8e773c3683f63e5782408644fb266fcdef2b79e Mon Sep 17 00:00:00 2001 From: Iakov Sumygin Date: Fri, 16 Feb 2024 11:57:25 +0000 Subject: [PATCH 1/3] publish on push to stable --- .github/workflows/publish.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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 00000000000..ebf940c729e --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,31 @@ +name: Publish to npm + +on: + push: + branches: + - stable + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Node.js 18.x + uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: 'npm' + registry-url: 'https://registry.npmjs.org/' + + - name: Install Dependencies + run: npm install + + - name: Build PlayCanvas + run: npm run build:publish + + - name: Publish to npm + run: npm publish --DRY-RUN + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file From 4a85e8da2f14ccde1ac08baf42877e3467f8e5a5 Mon Sep 17 00:00:00 2001 From: Iakov Sumygin Date: Fri, 16 Feb 2024 12:02:13 +0000 Subject: [PATCH 2/3] test --- .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 ebf940c729e..8af2bfa54c8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,7 +3,7 @@ name: Publish to npm on: push: branches: - - stable + - publish-on-push jobs: publish-npm: From c020682dd1f95a0a919c05a47fb58585be6ba231 Mon Sep 17 00:00:00 2001 From: Iakov Sumygin Date: Fri, 16 Feb 2024 14:23:25 +0000 Subject: [PATCH 3/3] publish on a tag --- .github/workflows/publish.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8af2bfa54c8..8479d26b948 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,8 +2,8 @@ name: Publish to npm on: push: - branches: - - publish-on-push + tags: + - '*' jobs: publish-npm: