Skip to content

Commit

Permalink
testing commit
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotCamblor committed Aug 30, 2024
1 parent 5ac4457 commit 74bffeb
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/release-and-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: 'Release and Build'
description: 'Build the project, commit changes, create a new release, and tag it'
on:
workflow_dispatch:
inputs:
Expand All @@ -11,7 +10,7 @@ on:
draft:
description: "Draft"
required: true
default: false
default: true
type: boolean
version-increment-type:
description: 'Which part of the version to increment:'
Expand All @@ -22,6 +21,9 @@ on:
- minor
- patch
default: 'patch'
push:
branches:
- release-workflow # Add this
permissions:
contents: write
jobs:
Expand All @@ -47,10 +49,10 @@ jobs:
id: prepare_release
uses: DevCycleHQ/release-action/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version-increment-type: ${{ inputs.version-increment-type }}
prerelease: ${{ inputs.prerelease }}
draft: ${{ inputs.draft }}
github-token: ${{ secrets.AUTOMATION_USER_TOKEN }}
version-increment-type: ${{ github.event.inputs.version-increment-type || 'patch' }}
prerelease: ${{ github.event.inputs.prerelease }}
draft: ${{ github.event.inputs.draft }}
- name: Commit version change
run: |
git config --global user.email "[email protected]"
Expand All @@ -59,7 +61,7 @@ jobs:
git commit -m "Release ${{steps.prepare_release.outputs.next-release-tag}}"
- name: Push version change
run: |
git push origin HEAD:main
git push origin HEAD:release-workflow # Change this to your test branch name
if: inputs.draft != true
- name: Create Release
id: create_release
Expand All @@ -68,14 +70,6 @@ jobs:
tag: ${{ steps.prepare_release.outputs.next-release-tag }}
target: ${{ github.sha }}
changelog: ${{ steps.prepare_release.outputs.changelog }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.AUTOMATION_USER_TOKEN }}
prerelease: ${{ inputs.prerelease }}
draft: ${{ inputs.draft }}

outputs:
release-tag:
description: 'Tag used for the release'
value: ${{ steps.prepare_release.outputs.next-release-tag }}
release-url:
description: 'URL of the created release'
value: ${{ steps.create_release.outputs.release-url }}
draft: ${{ inputs.draft }}

0 comments on commit 74bffeb

Please sign in to comment.