-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
name: Build and Release QHotkeys | ||
|
||
# Every push to the main branch | ||
on: | ||
push: | ||
branches: | ||
- main # Set this to the branch you want to build from | ||
branches: [ main ] | ||
|
||
jobs: | ||
publish: | ||
name: Publish to npm | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[publish]') | ||
if: '!startsWith(github.event.head_commit.message, "[ci-skip]")' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Fetch project | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run build | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build project | ||
run: npm run build | ||
- name: Publish to npm | ||
id: publish # Assign an ID to this step | ||
if: contains(github.event.head_commit.message, '[publish]') | ||
id: publish | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |