Skip to content

Commit

Permalink
ci: added workflows and semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon4ik committed Aug 13, 2024
1 parent eb4334b commit 55b63b1
Show file tree
Hide file tree
Showing 5 changed files with 2,597 additions and 188 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build package
on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 9

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build package
run: pnpm build
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build package
run: pnpm build

- name: Semantic Release
run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 20 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@semantic-release/git": "^10.0.1",
"rollup": "^4.19.0",
"semantic-release": "^24.0.0",
"tslib": "^2.6.3",
"typescript": "^5.5.4"
},
"repository": {
"type": "git",
"url": "git+https://github.com/idkncc/grechabuf.git"
},
"bugs": {
"url": "https://github.com/idkncc/grechabuf/issues"
},
"homepage": "https://github.com/idkncc/grechabuf#readme",
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 55b63b1

Please sign in to comment.