Skip to content

Commit

Permalink
chore: use gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan committed Oct 21, 2024
1 parent c974168 commit 6709c63
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 99 deletions.
4 changes: 0 additions & 4 deletions .github/codeql.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/codeql.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build
on: [push]

env:
CI_BUILD_NUM: ${{ github.run_id }}
CI_BRANCH: ${{ github.ref_name }}

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
- run: git config --global user.email "[email protected]" && git config --global user.name "Test Build"
- run: git config --global protocol.file.allow always
- run: npm run lint
- run: npm test
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Semantic Release (Dry Run)
run: npm run semantic-release-dry

test_win:
name: Test (Windows)
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
- run: git config --global user.email "[email protected]" && git config --global user.name "Test Build"
- run: git config --global protocol.file.allow always
- run: npm run test-ci-win

release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [test, test_win]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
- run: npm run semantic-release
47 changes: 0 additions & 47 deletions .github/workflows/semantic-release.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
steps:
- name: Comment
id: comment
uses: adobe-rnd/github-semantic-release-comment-action@master
uses: adobe-rnd/github-semantic-release-comment-action@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"start": "node src/run.js",
"test": "c8 mocha",
"lint": "eslint .",
"prepare": "husky install"
"prepare": "husky"
},
"dependencies": {
"dompurify": "3.1.7",
Expand Down

0 comments on commit 6709c63

Please sign in to comment.