-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: introduce semantic versioning (#97)
* refactor: undo unnecessary changes * docs: list all config values * refactor: rename config file * refactor: remove example files from docker image * refactor: merge config files * refactor: update .dockerignore to include all Dockerfiles and .env files * WIP: migrate from config macro to config function * refactor: configs for `log_format` and `event_store` * refactor: remove unused macros calls * refactor: migrate `url` config * refactor: `secret_manager` config * refactor: `credential_configurations` config * refactor: rename `DidMethodOptions`, add config for `signing_algorithms_supported` * refactor: determine default DID method * refactor: remove comments, load env variables * WIP: refactor `event_publishers` config * refactor: remove `metadata` * refactor: remove `config!` macro * refactor: rename `config_2` to `config` * chore: change example logo, disable `event_publisher`, respect `default_did_method` * chore: resolve clippy issues * refactor: remove `set_metadata_configuration` * refactor: remove `TEST_METADATA` * WIP * test: fix tests * ci: update docker-compose * fix: replace `localhost` with container name * refactor: clean up code * chore: fix unused import * feat: install `@commitlint` and `semantic-release` * feat: check PR title with `commitlint` * refactor: move `commitlint` to separate workflow * refactor: only check PR title for `dev` * chore: disable `types` (temporarily) * ci: add default `semantic-release` workflow (for Node projects) * docs: add reference to "Twelve-Factor App" * docs: add badge for DockerHub pulls * refactor: remove unused node dependencies * docs: describe branches and tags * ci: trigger release on push --------- Co-authored-by: Nander Stabel <nander.stabel@impierce.com>
- Loading branch information
1 parent
731032a
commit bae282b
Showing
5 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# The title of the pull request is used as the commit message when working with a squash-based merging style. | ||
# This project also follows semantic versioning, so it is important that the title follows conventional commits and should therefore be checked. | ||
|
||
name: Lint PR title | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- next | ||
- beta | ||
- alpha | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request | ||
# types: [opened, synchronize, reopened, edited] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- run: npm ci | ||
|
||
- run: echo $TITLE | npx commitlint | ||
env: | ||
# Security: we mitigate script injections by using an intermediate environment variable | ||
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | ||
TITLE: ${{ github.event.pull_request.title }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- next | ||
- beta | ||
- alpha | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Release | ||
run: npx semantic-release@24 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins: | ||
- "@semantic-release/commit-analyzer" | ||
- "@semantic-release/release-notes-generator" | ||
- "@semantic-release/github" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
extends: ["@commitlint/config-angular"], | ||
}; |