Skip to content

Commit

Permalink
ci: use semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
cwillisf committed Oct 17, 2023
1 parent b925940 commit 110f9a2
Show file tree
Hide file tree
Showing 4 changed files with 20,075 additions and 11,154 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,10 @@ jobs:
run: npm ci
- name: Lint
run: npm run lint
- name: Setup Deploy
run: |
echo "export NPM_TAG=latest" >> $GITHUB_ENV
echo "export NODE_ENV=production" >> $GITHUB_ENV
echo "export RELEASE_TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
npm run build
VPKG=$($(npm bin)/json -f package.json version)
echo "export VERSION=${VPKG}-prerelease.$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
- name: Deploy
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix') || startsWith(github.ref, 'refs/heads/release'))
run: |
npm --no-git-tag-version version $VERSION
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
npm publish
- name: Build
run: npm run build
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx --no -- semantic-release
Loading

0 comments on commit 110f9a2

Please sign in to comment.