Skip to content

Commit

Permalink
update to release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph5610 committed Aug 28, 2023
1 parent 57c3a17 commit 4ed8ef4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
name: Create Release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

- 'v*'
jobs:
prepareRelease:
if: startsWith(github.ref, 'refs/tags/')
name: Prepare Release
runs-on: macos-11
# Map a step output to a job output
outputs:
uploadUrl: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
- name: Release Changelog Builder
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitMode: true
- name: Create new Github Release
id: create_release
uses: comnoco/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Latest release.
body: ${{steps.build_changelog.outputs.changelog}}
draft: false
prerelease: false
build:
name: Create Release
if: startsWith(github.ref, 'refs/tags/')
name: Build macOS Release
runs-on: macos-11
needs:
- prepareRelease
Expand All @@ -43,7 +49,7 @@ jobs:
run: echo "DMG_PATH=$(find . -name "*.dmg")" >> $GITHUB_ENV
- name: Upload Release DMG
id: upload-release-dmg
uses: actions/upload-release-asset@v1
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -52,7 +58,8 @@ jobs:
asset_name: fxradio_macOS.dmg
asset_content_type: application/octet-stream
buildwin:
name: "Create Windows release"
if: startsWith(github.ref, 'refs/tags/')
name: Build Windows Release
runs-on: windows-latest
needs:
- prepareRelease
Expand All @@ -71,7 +78,7 @@ jobs:
run: echo "MSI_PATH=$(Get-ChildItem -path D:\ -recurse -include "FXRadio_*.msi" | Select -ExpandProperty FullName)" >> $env:GITHUB_ENV
- name: Upload Release MSI
id: upload-release-msi
uses: actions/upload-release-asset@v1
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit 4ed8ef4

Please sign in to comment.