From 3e4960549cbdb41c04deb0e7264051f5c010e404 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Fri, 29 Jan 2021 10:01:50 +0100 Subject: [PATCH] Do tag-based deployment for svelte-check `svelte-check` now is deployed only when a tag starting with `svelte-check-` is pushed. The VS Code extension now is deployed only when a tag starting with `extensions-` is pushed. Reason is that quite some people rely on `svelte-check` by now which demands a more manual deployment with dedicated changelogs. --- .github/workflows/Deploy.yml | 1 + .github/workflows/DeployExtensionsProd.yml | 4 +-- .github/workflows/DeploySvelteCheckProd.yml | 36 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/DeploySvelteCheckProd.yml diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index 1608f781f..a60403612 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -44,4 +44,5 @@ jobs: OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }} with: sort: '["svelte2tsx", "svelte-language-server", "svelte-check", "svelte-vscode-nightly"]' + only: '["svelte2tsx", "svelte-language-server", "svelte-vscode-nightly"]' install: "true" diff --git a/.github/workflows/DeployExtensionsProd.yml b/.github/workflows/DeployExtensionsProd.yml index 19037c049..f71d33c73 100644 --- a/.github/workflows/DeployExtensionsProd.yml +++ b/.github/workflows/DeployExtensionsProd.yml @@ -3,7 +3,7 @@ name: Tagged Production Deploys on: push: tags: - - "*" + - "extensions-*" jobs: deploy: @@ -24,7 +24,7 @@ jobs: - run: "npm install -g json" # Setup the environment - - run: 'json -I -f packages/svelte-vscode/package.json -e "this.version=\`${{ github.ref }}\`.split(\`/\`).pop()"' + - run: 'json -I -f packages/svelte-vscode/package.json -e "this.version=\`${{ github.ref }}\`.split(\`-\`).pop()"' # To deploy we need isolated node_modules folders which yarn won't do because it is a workspace # So, remove the workspace diff --git a/.github/workflows/DeploySvelteCheckProd.yml b/.github/workflows/DeploySvelteCheckProd.yml new file mode 100644 index 000000000..19db7fd17 --- /dev/null +++ b/.github/workflows/DeploySvelteCheckProd.yml @@ -0,0 +1,36 @@ +name: Tagged Production Deploys + +on: + push: + tags: + - "svelte-check-*" + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + registry-url: "https://registry.npmjs.org" + + # Ensure everything is compiling + - run: "yarn install" + - run: "yarn build" + + # Lets us use one-liner JSON manipulations the package.json files + - run: "npm install -g json" + + # Setup the environment + - run: 'json -I -f packages/svelte-check/package.json -e "this.version=\`${{ github.ref }}\`.split(\`-\`).pop()"' + + # Ship it + - run: | + cd packages/svelte-check + npm install + npm publish + + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}