Skip to content

Commit

Permalink
chore: Automate release with semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Dec 7, 2024
1 parent b3c9598 commit b7db0ff
Show file tree
Hide file tree
Showing 5 changed files with 2,536 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
fail-fast: false
matrix:
node:
- 18
- 20
steps:
- uses: actions/[email protected]
with:
Expand Down
32 changes: 31 additions & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- beta

jobs:
lint:
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
fail-fast: false
matrix:
node:
- 18
- 20
steps:
- uses: actions/[email protected]
with:
Expand All @@ -72,3 +73,32 @@ jobs:
- run: yarn
- run: yarn build:frame
- run: yarn test

release:
name: Release
runs-on: ubuntu-latest
needs:
- lint
- build
- coverage
- test
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: actions/[email protected]
with:
cache: yarn
check-latest: true
node-version: 22
- run: yarn
# TODO: Possibly download as artifact
- run: yarn build
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
6 changes: 6 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/npm"
- - "@semantic-release/github"
- successCommentCondition: <% return issue.user.type !== 'Bot'; %>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-h5p",
"version": "0.8.1",
"version": "0.0.0-development",
"description": "Vue.js Component for displaying h5p content, based on h5p-standalone",
"bugs": {
"url": "https://github.com/technowledgy/vue-h5p/issues"
Expand Down Expand Up @@ -43,6 +43,7 @@
"rollup-plugin-copy": "3.5.0",
"rollup-plugin-delete": "2.1.0",
"rollup-plugin-string": "3.0.0",
"semantic-release": "24.2.0",
"vite": "5.4.11",
"vite-plugin-vue2": "2.0.3",
"vue": "2.7.16",
Expand Down
Loading

0 comments on commit b7db0ff

Please sign in to comment.