Update create-release.yml

This commit is contained in:
Manuel Mayer
2023-06-06 22:34:48 +02:00
committed by GitHub
parent 63d4f8a8c3
commit b236b81fe0

View File

@@ -25,6 +25,9 @@ jobs:
get-version:
name: "Get Version"
runs-on: ubuntu-latest
outputs:
version: ${{ steps.fetch_version.outputs.version }}
is-beta: ${{ steps.fetch_version.outputs.is-beta }}
steps:
- name: Fetch Version From API
uses: Macro-Deck-App/Actions/fetch-version@main
@@ -44,18 +47,20 @@ jobs:
- name: Update CSProj Version
run: |
sed -i 's/<Version>.*<\/Version>/<Version>${{ needs.get-version.steps.fetch_version.output.version }}<\/Version>/' ./MacroDeck/MacroDeck.csproj
sed -i 's/<Version>.*<\/Version>/<Version>${{ needs.get-version.outputs.version }}<\/Version>/' ./MacroDeck/MacroDeck.csproj
git add ./MacroDeck/MacroDeck.csproj
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bump Version to ${{ needs.get-version.steps.fetch_version.output.version }}
commit_message: Bump Version to ${{ needs.get-version.outputs.version }}
release-github:
name: "Release GitHub"
outputs:
upload-url: ${{ steps.create_release.outputs.upload-url }}
runs-on: ubuntu-latest
needs: [tests, bump-version]
needs: [tests, get-version, bump-version]
steps:
- name: "Create Release"
@@ -63,37 +68,37 @@ jobs:
id: create_release
with:
github-token: "${{secrets.GITHUB_TOKEN}}"
is-beta: ${{ steps.fetch_version.outputs.is-beta }}
version: ${{ steps.fetch_version.outputs.version }}
is-beta: ${{ needs.get-version.outputs.is-beta }}
version: ${{ needs.get-version.outputs.version }}
release-windows:
name: "Build and Push Macro Deck for Windows"
uses: ./.github/workflows/build-push-windows.yml
needs: release-github
needs: [release-github, get-version]
secrets: inherit
with:
version: ${{ needs.release-github.steps.fetch_version.outputs.version }}
upload-url: ${{ needs.release-github.steps.create_release.outputs.upload-url }}
version: ${{ needs.get-version.outputs.version }}
upload-url: ${{ needs.release-github.outputs.upload-url }}
create-pull-request:
name: "Create pull-request back to develop"
runs-on: ubuntu-latest
needs: [bump-version, release-windows, release-github]
needs: [get-version, bump-version, release-windows, release-github]
steps:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: main
title: Bump Macro Deck version to ${{ needs.release-github.steps.fetch_version.outputs.version }}
body: Bumps the version of Macro Deck to ${{ needs.release-github.steps.fetch_version.outputs.version }}
title: Bump Macro Deck version to ${{ needs.get-version.outputs.version }}
body: Bumps the version of Macro Deck to ${{ needs.get-version.outputs.version }}
notify:
name: "Notify"
runs-on: ubuntu-latest
needs: [release-github, release-windows]
needs: [get-version, release-windows]
steps:
- uses: Macro-Deck-App/Actions/discord-notify-release@main
with:
version: ${{ needs.release-github.steps.fetch_version.outputs.version }}
is-beta: ${{ needs.release-github.steps.fetch_version.outputs.is-beta }}
version: ${{ needs.get-version.outputs.version }}
is-beta: ${{ needs.get-version.outputs.is-beta }}
webhook-token: ${{ secrets.WEBHOOK_KEY }}