Skip to content

Commit

Permalink
:feat: initialize automated publishing of ui package
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuel-musau committed Jan 8, 2025
1 parent f602705 commit 17ca6a0
Show file tree
Hide file tree
Showing 5 changed files with 3,018 additions and 176 deletions.
128 changes: 0 additions & 128 deletions .github/workflows/publish.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
branches:
- main
- beta

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "lts/*"

# Install dependencies
- name: Install dependencies
run: |
cd ui
npm ci
# Build the project
- name: Build
run: |
cd ui
npm run build
# Audit signatures
- name: Audit
run: |
cd ui
npm audit signatures
# Release
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd ui
npx semantic-release
31 changes: 31 additions & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
branches: [
"main",
{
name: "beta",
prerelease: true
}
],
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "angular",
releaseRules: [
{ type: "fix", release: "patch" },
{ type: "perf", release: "major" },
{ type: "feat", release: "minor" }
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
npmPublish: true,
tarballDir: "dist"
}
],
"@semantic-release/github"
]
};
7 changes: 6 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intersect.mbo/govtool-outcomes-pillar-ui",
"version": "1.0.7",
"version": "0.0.0-development",
"description": "Governance actions outcomes ui",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand All @@ -12,8 +12,12 @@
"scripts": {
"build": "rollup -c --bundleConfigAsCjs ",
"prepublishOnly": "npm run build",
"semantic-release": "semantic-release",
"watch": "rollup -c --bundleConfigAsCjs --watch"
},
"publishConfig": {
"access": "public"
},
"contributors": [
{
"name": "Lido Nation",
Expand Down Expand Up @@ -46,6 +50,7 @@
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"sass": "^1.81.1",
"semantic-release": "^24.2.1",
"tailwindcss": "^3.4.17",
"tslib": "^2.8.1",
"typescript": "^5.7.2"
Expand Down
Loading

0 comments on commit 17ca6a0

Please sign in to comment.