Skip to content

Commit

Permalink
Keep workflows as single in order to have a continuous package number
Browse files Browse the repository at this point in the history
  • Loading branch information
intelligide committed Nov 17, 2023
1 parent aca82e8 commit c363753
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 43 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ on:
SPK_ARCH:
required: true
type: string
PackageBuildNumber:
required: false
type: number
default: ${{ github.run_number }}

jobs:
build:
name: Build Package P4D=${{ inputs.P4D_VERSION }} Platform${{ inputs.SPK_PLATFORM }} DSM=${{ inputs.DSM_VERSION }} Arch=${{ inputs.SPK_ARCH }}
name: Build Package P4D=${{ inputs.P4D_VERSION }} Platform=${{ inputs.SPK_PLATFORM }} DSM=${{ inputs.DSM_VERSION }} Arch=${{ inputs.SPK_ARCH }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -39,7 +43,7 @@ jobs:
SPK_ARCH: ${{ inputs.SPK_ARCH }}
P4D_VERSION: ${{ inputs.P4D_VERSION }}
SPK_BETA: ${{ github.event_name != 'release' || (github.event_name == 'release' && github.event.release.prerelease) }}
SPK_PACKAGE_BUILD_NUMBER: "${{ github.run_number }}"
SPK_PACKAGE_BUILD_NUMBER: "${{ inputs.PackageBuildNumber }}"

- name: Rename artifact
run: |
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Build Test
name: Build & Release

on:
workflow_dispatch:
push:
branches:
- main
release:
types: [published]

jobs:
build:
Expand All @@ -23,3 +25,19 @@ jobs:
DSM_VERSION: ${{ matrix.DSM_VERSION }}
SPK_PLATFORM: ${{ matrix.SPK_PLATFORM }}
SPK_ARCH: ${{ matrix.SPK_ARCH }}

release:
name: Upload Packages in Github Release
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: packages

- name: Upload artifacts
uses: softprops/action-gh-release@v1
with:
files: |
packages/HelixCoreServer-*/HelixCoreServer-*.spk
40 changes: 0 additions & 40 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit c363753

Please sign in to comment.