Skip to content

Commit

Permalink
Automated release job
Browse files Browse the repository at this point in the history
  • Loading branch information
jimid27 committed Apr 29, 2024
1 parent 859cda2 commit f5a9cf0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Release

on:
push:
paths:
- package.json
branches:
- main
workflow_dispatch:
inputs:
release_type:
description: Type of release to perform
required: true
default: patch

jobs:

Expand All @@ -16,12 +17,22 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure git user
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- uses: prefecthq/actions-release-ui-components@main
id: release-ui-components
with:
NPM_TOKEN: ${{ secrets.PREFECT_UI_COMPONENTS_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PREFECT_CONTENTS_PR_RW }}
RELEASE_TYPE: ${{ inputs.release_type }}
SKIP_BUILD: 'true'


- uses: prefecthq/actions-trigger-downstream-npm-package-updates@main
id: trigger-downstream-npm-package-update-nebula-ui
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"build": "vue-tsc && tsc-alias && vite build",
"lint": "eslint src && eslint demo",
"lint:fix": "eslint src --fix && eslint demo --fix",
"validate:types": "vue-tsc"
"validate:types": "vue-tsc",
"version": "npm run changelog && git add CHANGELOG.md",
"release": "./vue-charts-release"
},
"main": "./dist/vue-charts.umd.js",
"module": "./dist/vue-charts.mjs",
Expand All @@ -35,6 +37,7 @@
"@types/lodash.debounce": "4.0.9",
"@types/node": "20.12.2",
"@vitejs/plugin-vue": "4.5.1",
"auto-changelog": "^2.4.0",
"autoprefixer": "^10.4.17",
"eslint": "8.57.0",
"tailwindcss": "3.4.1",
Expand Down
7 changes: 7 additions & 0 deletions vue-charts-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
echo "Is the release a major, minor, or patch release?"
read release_type
gh workflow run release.yml \
--repo=prefecthq/vue-charts \
--ref=main \
-f release_type=$release_type

0 comments on commit f5a9cf0

Please sign in to comment.