-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dea9186
commit 560813e
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ on: | |
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Run Dev Build' | ||
dev_version: | ||
description: 'DEV Build version (postfix)' | ||
required: true | ||
type: boolean | ||
type: string | ||
env: | ||
PYTHON_VERSION: "3.11" | ||
|
||
|
@@ -23,15 +23,15 @@ jobs: | |
- name: Get tag | ||
id: vars | ||
run: >- | ||
if [[ "${{ inputs.tags }}" == "true" ]]; then | ||
echo "tag=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT | ||
if [[ "${{ inputs.dev_version }}" ]]; then | ||
echo "tag=${dev_version}.dev$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT | ||
else | ||
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Validate version number | ||
run: >- | ||
if [[ "${{ inputs.tags }}" == "true" ]]; then | ||
echo "Skipping version validation for manual trigger" | ||
if [[ "${{ inputs.dev_version }}" ]]; then | ||
echo "Skipping version validation for dev version via manual trigger" | ||
else | ||
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then | ||
if ! [[ "${{ steps.vars.outputs.tag }}" =~ "b" || "${{ steps.vars.outputs.tag }}" =~ "rc" ]]; then | ||
|
@@ -76,7 +76,7 @@ jobs: | |
|
||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ ! inputs.tags }} | ||
if: ${{ ! inputs.dev_version }} | ||
needs: build-artifact | ||
steps: | ||
- name: Retrieve release distributions | ||
|
@@ -104,7 +104,7 @@ jobs: | |
always() && | ||
((github.event.release.prerelease == false && needs.pypi-publish.result == 'success') || | ||
(github.event.release.prerelease == true && needs.pypi-publish.result == 'skipped') || | ||
(inputs.tags && needs.pypi-publish.result == 'skipped')) | ||
(inputs.dev_version && needs.pypi-publish.result == 'skipped')) | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Download Widevine CDM client files from private repository | ||
|
@@ -138,7 +138,7 @@ jobs: | |
echo "major=${patch%.*.*}" >> $GITHUB_OUTPUT | ||
- name: Build and Push release | ||
uses: docker/[email protected] | ||
if: ${{ ! inputs.tags && github.event.release.prerelease == false }} | ||
if: ${{ ! inputs.dev_version && github.event.release.prerelease == false }} | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
|
@@ -153,7 +153,7 @@ jobs: | |
build-args: "MASS_VERSION=${{ needs.build-artifact.outputs.version }}" | ||
- name: Build and Push pre-release | ||
uses: docker/[email protected] | ||
if: ${{ ! inputs.tags && github.event.release.prerelease == true }} | ||
if: ${{ ! inputs.dev_version && github.event.release.prerelease == true }} | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
|
@@ -165,7 +165,7 @@ jobs: | |
build-args: "MASS_VERSION=${{ needs.build-artifact.outputs.version }}" | ||
- name: Build and Push dev-release | ||
uses: docker/[email protected] | ||
if: inputs.tags | ||
if: inputs.dev_version | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
|