From 5c39c9afc0534bca17aba8962c51bc1f65288503 Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Wed, 20 Oct 2021 12:44:05 +0100 Subject: [PATCH] TEMP: test new workflow `tag-and-publish` --- .github/workflows/tag-and-publish.yml | 59 +++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tag-and-publish.yml diff --git a/.github/workflows/tag-and-publish.yml b/.github/workflows/tag-and-publish.yml new file mode 100644 index 00000000..44fddc0c --- /dev/null +++ b/.github/workflows/tag-and-publish.yml @@ -0,0 +1,59 @@ +# GitHub Actions workflows: +# https://docs.github.com/en/actions + +name: Create new tag and publish to NPM + +on: + push: + branches: + - ci-create-workflow-publish-npm + +jobs: + create-tag: + name: Create new tag + runs-on: ubuntu-latest + timeout-minutes: 20 + outputs: + new-tag: ${{ steps.detect-version-and-tag.outputs.tag }} + + steps: + - uses: actions/checkout@v2 + with: + # Required to ensure git history is properly checked: + # https://github.com/salsify/action-detect-and-tag-new-version/blob/v2.0.1/README.md?plain=1#L11 + fetch-depth: 2 + # for testing, see: + # - https://github.com/salsify/action-detect-and-tag-new-version/issues/6#issuecomment-853897479 + # - https://github.com/actions/checkout/tree/v2#usage + ref: ci-create-workflow-publish-npm + + - name: Detect version and tag + id: detect-version-and-tag + uses: salsify/action-detect-and-tag-new-version@v2 + with: + create-tag: false # for testing + + publish: + if: ${{ needs.create-tag.outputs.new-tag }} + name: Publish to NPM + needs: create-tag + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: '12' + # Required if we want to authenticate during the `npm publish`: + # https://github.com/actions/setup-node/blob/v2.4.1/action.yml#L15-L16 + registry-url: 'https://registry.npmjs.org' + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Publish to NPM + run: npm publish --dry-run + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} diff --git a/package.json b/package.json index 1cf620c7..b4158b8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli-embedded", - "version": "2.2.0", + "version": "2.2.1", "description": "Control how your Ember applications boot in non-Ember pages/apps.", "homepage": "https://github.com/peopledoc/ember-cli-embedded", "keywords": [