Skip to content

Commit

Permalink
Merge pull request #494 from PrefectHQ/chore/introduce-release-automa…
Browse files Browse the repository at this point in the history
…tion

Chore/introduce release automation
  • Loading branch information
jimid27 authored May 1, 2024
2 parents 4338c3a + 5020c02 commit 998455e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
name: Release

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

jobs:

build-and-publish:
name: Build & Publish Release
runs-on: ubuntu-latest
environment: 'prod'

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

- uses: prefecthq/actions-trigger-downstream-npm-package-updates@main
id: trigger-downstream-npm-package-update-prefect-ui-library
Expand Down
7 changes: 7 additions & 0 deletions graphs-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/graphs \
--ref=main \
-f release_type=$release_type
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"changelog": "auto-changelog --package --commit-limit 0",
"version": "npm run changelog && git add CHANGELOG.md"
"version": "npm run changelog && git add CHANGELOG.md",
"release": "./graphs-release"
},
"main": "./dist/graphs.umd.js",
"module": "./dist/graphs.mjs",
Expand Down

0 comments on commit 998455e

Please sign in to comment.