From bf9fd414016eb7e642d93e669f6220ee61440b20 Mon Sep 17 00:00:00 2001 From: Christian Kohler Date: Sat, 1 Jun 2024 14:06:05 +0100 Subject: [PATCH] [chore]: move gh action release to manual triggger --- .github/workflows/main.yml | 29 +----------------------- .github/workflows/pull-requests.yml | 2 +- .github/workflows/release.yml | 34 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f60fd3..29aade3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,31 +27,4 @@ jobs: - name: Run headless test uses: coactions/setup-xvfb@v1 with: - run: npm test - - publish: - name: Release and publish - if: github.event_name != 'pull_request' - needs: test - runs-on: ubuntu-18.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 16 - - name: Install dependencies - run: npm install - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} - run: npx semantic-release - - name: Publish - if: success() - run: npm run deploy - env: - VSCE_PAT: ${{ secrets.VSCE_PAT }} - - name: Publish to OpenVSX - if: success() - run: npx ovsx publish -p ${{ secrets.OVSX_PAT }} + run: npm test \ No newline at end of file diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index a5e6d43..790ab0e 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -25,6 +25,6 @@ jobs: - name: Install dependencies run: npm install - name: Run headless test - uses: GabrielBB/xvfb-action@v1.0 + uses: coactions/setup-xvfb@v1 with: run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dbfdaf3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +# This is a basic workflow to help you get started with Actions + +name: Release + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + workflow_dispatch: + +jobs: + publish: + name: Release and publish + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Install dependencies + run: npm install + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} + run: npx semantic-release + - name: Publish + if: success() + run: npm run deploy + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }} + - name: Publish to OpenVSX + if: success() + run: npx ovsx publish -p ${{ secrets.OVSX_PAT }}