Skip to content

Commit

Permalink
[CI] Support building multiple versions of the same package
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Nov 2, 2023
1 parent e2822ae commit 1d01e5b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
package:
required: true
type: string

version:
required: false
type: string
default: ''
jobs:
build:
if: "!contains(github.event.head_commit.message, '[SkipCI]')"
Expand All @@ -32,7 +35,7 @@ jobs:
- run: sdkmanager "ndk;${{ matrix.ndk }}"
- run: pip3 install --user ninja meson

- run: ./gradlew ${{ inputs.package }}:publishToMavenLocal -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}
- run: ./gradlew ${{ inputs.package }}:publishToMavenLocal -PpackageVersion=${{ inputs.version }} -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}

- uses: actions/upload-artifact@v3
name: Artifact logs
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/pango.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ on:
- '.github/workflows/pango.yml'

jobs:
build:
name: pango
build-pango-current:
name: pango 1.51.0
uses: ./.github/workflows/build.yml
with:
package: pango
version: 1.51.0

build-pango-legacy:
name: pango 1.49.4
uses: ./.github/workflows/build.yml
with:
package: pango
version: 1.49.4
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
PACKAGE:
description: 'Package name'
required: true
VERSION:
description: 'Package version'
default: ''
required: false
jobs:
release:
name: Release ${{ github.event.inputs.PACKAGE }} ${{ matrix.ndk }} ${{ matrix.libraryType }}
Expand All @@ -31,7 +35,7 @@ jobs:
- run: sdkmanager "ndk;${{ matrix.ndk }}"
- run: pip3 install --user ninja meson

- run: ./gradlew ${{ github.event.inputs.PACKAGE }}:publishToMavenLocal -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}
- run: ./gradlew ${{ github.event.inputs.PACKAGE }}:publishToMavenLocal -PpackageVersion=${{ github.even.inputs.VERSION }} -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}

- uses: actions/upload-artifact@v3
with:
Expand All @@ -46,7 +50,7 @@ jobs:
path: ~/.m2
if-no-files-found: error

- run: ./gradlew ${{ github.event.inputs.PACKAGE }}:publishToSonatype closeSonatypeStagingRepository -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}
- run: ./gradlew ${{ github.event.inputs.PACKAGE }}:publishToSonatype -PpackageVersion=${{ github.even.inputs.VERSION }} closeSonatypeStagingRepository -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down

0 comments on commit 1d01e5b

Please sign in to comment.