Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/introduce release automation #433

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 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,20 @@ 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 }}

- 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
Loading