Skip to content

Commit

Permalink
Merge pull request #114 from adobe/bye-bye-circle-ci
Browse files Browse the repository at this point in the history
switch from circleci to github actions (2.x)
  • Loading branch information
trieloff authored Jan 17, 2024
2 parents 8e2b9e7 + 7fc049e commit 149d8e7
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 67 deletions.
44 changes: 0 additions & 44 deletions .circleci/config.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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 test
- uses: codecov/codecov-action@v3
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' || github.ref == 'refs/heads/1.x'
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 }}
23 changes: 0 additions & 23 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 @@ -9,6 +9,7 @@
"lint": "eslint .",
"docs": "npx jsdoc2md -c .jsdoc.json --files 'src/*.js' > docs/API.md",
"semantic-release": "semantic-release",
"semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
"prepare": "husky install"
},
"repository": {
Expand Down

0 comments on commit 149d8e7

Please sign in to comment.