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 1fac88e commit 5707474
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
22 changes: 16 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,21 @@ 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 "$GITHUB_ACTOR@users.noreply.github.com"
- 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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint:fix": "eslint ./ --fix",
"types": "vue-tsc --noEmit",
"changelog": "auto-changelog --package --commit-limit 0",
"version": "npm run changelog && git add CHANGELOG.md"
"version": "npm run changelog && git add CHANGELOG.md",
"release": "./vue-compositions-release"
},
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions vue-compositions-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-compositions \
--ref=main \
-f release_type=$release_type

0 comments on commit 5707474

Please sign in to comment.