Skip to content

Commit

Permalink
chore: move to gh-actions (#360)
Browse files Browse the repository at this point in the history
* chore: move to gh-actions

* chore: fix
  • Loading branch information
tripodsan authored Sep 16, 2024
1 parent 8493d16 commit 665ce9d
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 105 deletions.
42 changes: 0 additions & 42 deletions .circleci/config.yml

This file was deleted.

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

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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: 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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}

release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
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: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/semantic-release.yaml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"test-ci": "nyc mocha && codecov",
"lint": "./node_modules/.bin/eslint .",
"docs": "npx jsdoc2md -t jsdoc2md/README.hbs src/*.js > README.md; echo",
"semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
"semantic-release": "semantic-release"
},
"repository": {
Expand Down

0 comments on commit 665ce9d

Please sign in to comment.