Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
2.2 KiB

name: Version Bump
on:
push:
branches: [main]
jobs:
get-pr-labels:
runs-on: ubuntu-latest
outputs:
pr_number: ${{ steps.get_merged_pull_request.outputs.number }}
pr_labels: ${{ steps.get_merged_pull_request.outputs.labels }}
version_mask: ${{ steps.get_merged_pull_request.outputs.version_mask }}
steps:
- name: Get Merged PR Labels
id: get_merged_pull_request
uses: actions-ecosystem/action-get-merged-pull-request@v1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "pr_number=${{ steps.get_merged_pull_request.outputs.number }}" >> "$GITHUB_OUTPUT"
echo "pr_labels=${{ steps.get_merged_pull_request.outputs.labels }}" >> "$GITHUB_OUTPUT"
echo PR Number: ${{ steps.get_merged_pull_request.outputs.number }}
echo PR Labels: ${{ steps.get_merged_pull_request.outputs.labels }}
if [[ "${{ steps.get_merged_pull_request.outputs.labels }}" == *"Bump Major"* ]]; then
echo "Bump Major"
echo "version_mask=1.0.0.0" >> "$GITHUB_ENV"
elif [[ "${{ steps.get_merged_pull_request.outputs.labels }}" == *"Bump Minor"* ]]; then
echo "Bump Minor"
echo "version_mask=0.1.0.0" >> "$GITHUB_ENV"
elif [[ "${{ steps.get_merged_pull_request.outputs.labels }}" == *"Bump Patch"* ]]; then
echo "Bump Patch"
echo "version_mask=0.0.1.0" >> "$GITHUB_ENV"
else
echo "No Bump Label"
fi
version-bump-pr:
name: Version Bump PR
needs: get-pr-labels
runs-on: windows-latest
env:
version_mask: ${{ needs.get-pr-labels.outputs.version_mask }}
version_overwrite: "*.*.*.*"
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Bump versions
uses: SiqiLu/dotnet-bump-version@2.0.0
with:
version_files: "**/*.csproj"
version_mask: ${{ env.version_mask }}
version_overwrite: ${{ env.version_overwrite }}
github_token: ${{ secrets.GITHUB_TOKEN }}