Skip to content

Commit

Permalink
specify main version for dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt authored Sep 4, 2024
1 parent dea9186 commit 560813e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 560813e

Please sign in to comment.