Skip to content

Commit

Permalink
chore: use gh actions (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan authored Oct 21, 2024
1 parent a4ccbb3 commit a3ee7d4
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 72 deletions.
44 changes: 0 additions & 44 deletions .circleci/config.yml

This file was deleted.

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

permissions:
contents: write # semantic-release-dry verifies the write permissions
issues: read # needed by semantic-release
pull-requests: write # needed by semantic-release

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 18.x
uses: actions/setup-node@v4
with:
node-version: '18.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
if: github.ref == 'refs/heads/main'
needs: test
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: '18.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.

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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"test": "c8 mocha",
"test-ci": "c8 mocha",
"semantic-release": "semantic-release",
"prepare": "husky install"
"semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
"prepare": "husky"
},
"mocha": {
"timeout": "5000",
Expand Down

0 comments on commit a3ee7d4

Please sign in to comment.