From 57074740357b57e3a3783ea4797e731a56bb296f Mon Sep 17 00:00:00 2001 From: jimid27 Date: Mon, 29 Apr 2024 14:10:05 -0400 Subject: [PATCH 1/2] Automated release job --- .github/workflows/release.yml | 22 ++++++++++++++++------ package.json | 3 ++- vue-compositions-release | 7 +++++++ 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100755 vue-compositions-release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffc0955..969b91a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 diff --git a/package.json b/package.json index 3425d93..82f7889 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/vue-compositions-release b/vue-compositions-release new file mode 100755 index 0000000..5a589f8 --- /dev/null +++ b/vue-compositions-release @@ -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 From 1e369f8f73e2d5eb9cbcdd5dfd88d62e58202779 Mon Sep 17 00:00:00 2001 From: jimid27 Date: Mon, 29 Apr 2024 14:34:02 -0400 Subject: [PATCH 2/2] Do not skip release --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 969b91a..3490294 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,6 @@ jobs: NPM_TOKEN: ${{ secrets.PREFECT_UI_COMPONENTS_NPM_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