Skip to content

Commit

Permalink
ci: continuous delivery
Browse files Browse the repository at this point in the history
closes #840

Co-authored-by: Rostislav Simonik <rostislav.simonik@technologystudio.sk>
  • Loading branch information
mightyiam and rostislav-simonik committed Aug 9, 2022
1 parent 9b205a8 commit 971c680
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Expand Up @@ -3,6 +3,24 @@ on:
push: {}

jobs:
publish:
needs: ci
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: navikt/github-app-token-generator@v1
id: get-token
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: actions/checkout@v3
with:
persist-credentials: false # for later steps to use a different authentication
- run: npm install
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# The ci-matrix job ends up as multiple jobs and therefore as multiple checks.
# Each check's name ends up with the node version appended.
# If we were to use those checks as required checks, we would have to occasionally bump them.
Expand Down
44 changes: 44 additions & 0 deletions .releaserc.yml
@@ -0,0 +1,44 @@
branches:
- master
plugins:
- - "@semantic-release/commit-analyzer"
- releaseRules:
- breaking: true
release: major
- revert: true
release: patch
- type: feat
release: minor
- type: fix
release: patch
- type: perf
release: patch
- type: docs
release: patch
- - "@semantic-release/release-notes-generator"
- preset: conventionalcommits
presetConfig:
types:
- type: build
section: Build system / dependencies
- type: ci
section: CI
- type: docs
section: Documentation
- type: feat
section: Features
- type: fix
section: Bug fixes
- type: perf
section: Performance
- type: refactor
section: Refactoring
- type: test
section: Testing
- "@semantic-release/changelog"
- "@semantic-release/github"
- "@semantic-release/npm"
- - "@semantic-release/git"
- assets:
- CHANGELOG.md
- package.json
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -68,6 +68,8 @@
"@arkweid/lefthook": "0.7.7",
"@commitlint/cli": "17.0.3",
"@commitlint/config-conventional": "17.0.3",
"@semantic-release/changelog": "6.0.1",
"@semantic-release/git": "10.0.1",
"@types/eslint": "8.4.5",
"@types/js-yaml": "4.0.5",
"@types/node": "18.6.5",
Expand All @@ -86,6 +88,7 @@
"npm-run-all": "4.1.5",
"read-pkg-up": "8.0.0",
"runtypes": "6.5.1",
"semantic-release": "19.0.3",
"semver": "7.3.7",
"standard-version": "9.5.0",
"tsconfigs": "5.0.0",
Expand Down

0 comments on commit 971c680

Please sign in to comment.