Skip to content

WelcomeReleaseNotes - Release notes for version 1.0.5 #46

WelcomeReleaseNotes - Release notes for version 1.0.5

WelcomeReleaseNotes - Release notes for version 1.0.5 #46

Workflow file for this run

name: New Release
on:
push:
tags:
- 'v*' # Triggers the workflow on push events that create tags matching the pattern 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version (Same as set at gradle)'
required: true
type: string
isPreRelease:
description: 'Is pre-release?'
default: false
required: true
type: boolean
alphaVersion:
description: 'Alpha version (ex: alpha1)'
required: false
type: string
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_macos:
runs-on: macos-latest
steps:
- name: Checkout sources
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v4
- name: Determine Version
id: determine_version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV # Sets the VERSION environment variable for workflow_dispatch
elif [ "${{ github.event_name }}" = "push" ]; then
TAG_NAME=${{ github.ref_name }}
VERSION=${TAG_NAME#v} # Removes the 'v' prefix from the tag name to get the version
echo "VERSION=${VERSION}" >> $GITHUB_ENV # Sets the VERSION environment variable for push
fi
- name: Use Version
run: echo "Using version ${{ env.VERSION }}"
- name: Setup Java 18
uses: actions/setup-java@v4 # Uses the setup-java action to set up JDK 18
with:
java-version: 18 # Specifies the version of Java to set up
architecture: x64 # Specifies the architecture of Java to set up
distribution: 'temurin' # Specifies the distribution of Java to set up (e.g., adopt, zulu, temurin)
- run: echo "JAVA_18=$JAVA_HOME" >> $GITHUB_ENV # Sets the JAVA_HOME environment variable
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
add-job-summary: on-failure
add-job-summary-as-pr-comment: on-failure
- run: ./gradlew --stacktrace --scan packageReleaseDmg # Runs the Gradle task to create a release version of DMG file
- name: Upload DMG Artifact
uses: actions/upload-artifact@v4 # Uses the upload-artifact action to upload the DMG file
with:
name: ADBugger-dmg # Name of the artifact
path: build/output/main-release/dmg/ADBugger-${{ env.VERSION }}.dmg # Path to the DMG file, using the version input
build_win:
runs-on: windows-latest
steps:
- name: Checkout sources
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v4
- name: Determine Version
id: determine_version
run: |
if ($env:GITHUB_EVENT_NAME -eq 'workflow_dispatch') {
echo "VERSION=${{ github.event.inputs.version }}" >> $env:GITHUB_ENV # Sets the VERSION environment variable for workflow_dispatch
} elseif ($env:GITHUB_EVENT_NAME -eq 'push') {
$TAG_NAME = "${{ github.ref_name }}"
$VERSION = $TAG_NAME -replace '^v', '' # Removes the 'v' prefix from the tag name to get the version
echo "VERSION=${VERSION}" >> $env:GITHUB_ENV # Sets the VERSION environment variable for push
}
shell: pwsh
- name: Use Version
run: echo "Using version ${{ env.VERSION }}"
- name: Setup Java 18
uses: actions/setup-java@v4 # Uses the setup-java action to set up JDK 18
with:
java-version: 18 # Specifies the version of Java to set up
architecture: x64 # Specifies the architecture of Java to set up
distribution: 'temurin' # Specifies the distribution of Java to set up (e.g., adopt, zulu, temurin)
- run: echo "JAVA_18=$JAVA_HOME" >> $GITHUB_ENV # Sets the JAVA_HOME environment variable
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
add-job-summary: on-failure
add-job-summary-as-pr-comment: on-failure
- run: ./gradlew --stacktrace --scan packageReleaseMsi # Runs the Gradle task to create a release version of MSI file
- name: Upload MSI Artifact
uses: actions/upload-artifact@v4 # Uses the upload-artifact action to upload the MSI file
with:
name: ADBugger-msi # Name of the artifact
path: build/output/main-release/msi/ADBugger-${{ env.VERSION }}.msi # Path to the MSI file, using the version input
# A separate job to handle the release process
release:
needs: [ build_macos, build_win ] # Specifies that this job depends on the successful completion of the build job
runs-on: ubuntu-latest # Specifies that the job runs on an Ubuntu runner
steps:
- name: Determine Version
id: determine_version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
echo "IS_PRE_RELEASE=${{ github.event.inputs.isPreRelease }}" >> $GITHUB_ENV
echo "ALPHA_VERSION=-${{ github.event.inputs.alphaVersion }}" >> $GITHUB_ENV
elif [ "${{ github.event_name }}" = "push" ]; then
TAG_NAME=${{ github.ref_name }}
VERSION=${TAG_NAME#v} # Removes the 'v' prefix from the tag name to get the version
echo "VERSION=${VERSION}" >> $GITHUB_ENV # Sets the VERSION environment variable for push
fi
- name: Use Version
run: echo "Using version ${{ env.VERSION }}"
- name: Is pre-release?
run: echo "Using version ${{ env.IS_PRE_RELEASE }}"
- name: Alpha version
run: echo "Using version ${{ env.ALPHA_VERSION }}"
- name: Download Artifact DMG
uses: actions/download-artifact@v4 # Uses the download-artifact action to download the previously uploaded DMG file
with:
name: ADBugger-dmg # Name of the artifact to download
path: ./ # Path to download the artifact to
- name: Download Artifact MSI
uses: actions/download-artifact@v4 # Uses the download-artifact action to download the previously uploaded MSI file
with:
name: ADBugger-msi # Name of the artifact to download
path: ./ # Path to download the artifact to
- name: Create GitHub Release
id: create_release # Sets an ID for the step to reference later
uses: actions/create-release@v1 # Uses the create-release action to create a GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Uses the GitHub token to authenticate
with:
tag_name: v${{ env.VERSION }}${{ env.ALPHA_VERSION }} # Tag name for the release, using the version input
release_name: Release v${{ env.VERSION }}${{ env.ALPHA_VERSION }} # Name of the release, using the version input
draft: false # Specifies that the release is not a draft
prerelease: ${{ env.IS_PRE_RELEASE }}
- name: Upload Release Asset DMG
id: upload_release_dmg
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}${{ env.ALPHA_VERSION }} # Tag name for the release, using the version input
name: Release v${{ env.VERSION }}${{ env.ALPHA_VERSION }} # Name of the release, using the version input
files: ./ADBugger-${{ env.VERSION }}.dmg # Path to the DMG file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Uses the GitHub token to authenticate
- name: Upload Release Asset MSI
id: upload_release_msi
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}${{ env.ALPHA_VERSION }} # Tag name for the release, using the version input
name: Release v${{ env.VERSION }}${{ env.ALPHA_VERSION }} # Name of the release, using the version input
files: ./ADBugger-${{ env.VERSION }}.msi # Path to the MSI file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Uses the GitHub token to authenticate