Skip to content

Commit

Permalink
[chore]: move gh action release to manual triggger
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKohler committed Jun 1, 2024
1 parent 82a9b23 commit bf9fd41
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 29 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit bf9fd41

Please sign in to comment.