Skip to content

Commit

Permalink
Merge pull request #1239 from PrefectHQ/chore/re-enable-automated-rel…
Browse files Browse the repository at this point in the history
…ease

chore/Re-enable with config fix
  • Loading branch information
jimid27 authored Apr 24, 2024
2 parents 390ebbd + 279ff0f commit d771225
Showing 1 changed file with 29 additions and 32 deletions.
61 changes: 29 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:
# inputs:
# release_type:
# description: Type of release to perform
# required: true
# default: patch
inputs:
release_type:
description: Type of release to perform
required: true
default: patch

jobs:
build-and-publish:
Expand All @@ -18,33 +15,33 @@ jobs:
environment: 'prod'

steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
- 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"
# # Checkout branch, bump version, push, merge, create release
# - name: Setup Node
# id: setup_node
# uses: prefecthq/actions-setup-nodejs@main
- name: Configure git user
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
# Checkout branch, bump version, push, merge, create release
- name: Setup Node
id: setup_node
uses: prefecthq/actions-setup-nodejs@main

# - name: Bump Package Version
# id: bump_version
# run: |
# npm version ${{ inputs.release_type }}
# echo "RELEASE_VERSION=$(cat package.json | jq .version | tr -d '"')" >> $GITHUB_ENV
- name: Bump Package Version
id: bump_version
run: |
npm version ${{ inputs.release_type }}
echo "RELEASE_VERSION=$(cat package.json | jq .version | tr -d '"')" >> $GITHUB_ENV
# - name: Bump Version and Create Release
# run: |
# git checkout -b $RELEASE_VERSION
# git push --set-upstream origin $RELEASE_VERSION
# gh pr create --base main -f
# gh pr merge --squash
# env:
# GITHUB_TOKEN: ${{ secrets.PREFECT_CONTENTS_PR_RW }}
- name: Bump Version and Create Release
run: |
git checkout -b $RELEASE_VERSION
git push --set-upstream origin $RELEASE_VERSION
gh pr create --base main -f
gh pr merge --squash --admin --delete-branch
env:
GITHUB_TOKEN: ${{ secrets.PREFECT_CONTENTS_PR_RW }}

- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit d771225

Please sign in to comment.