mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
fix(ci): Run release version bump before mobile build (#1542)
* fix(ci): Run release version bump before mobile build * feat(ci): Add ref input to build-mobile * feat(ci): Pass new tag ref to build_mobile flow in prepare-release * chore(ci): Naming
This commit is contained in:
parent
6bac9c7e8f
commit
e4b3479779
2 changed files with 32 additions and 7 deletions
14
.github/workflows/build-mobile.yml
vendored
14
.github/workflows/build-mobile.yml
vendored
|
@ -3,6 +3,10 @@ name: Build Mobile
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
@ -13,7 +17,17 @@ jobs:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Determine ref
|
||||||
|
id: get-ref
|
||||||
|
run: |
|
||||||
|
input_ref="${{ inputs.ref }}"
|
||||||
|
github_ref="${{ github.sha }}"
|
||||||
|
ref="${input_ref:-$github_ref}"
|
||||||
|
echo "ref=$ref" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ steps.get-ref.outputs.ref }}
|
||||||
|
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
|
|
25
.github/workflows/prepare-release.yml
vendored
25
.github/workflows/prepare-release.yml
vendored
|
@ -18,14 +18,12 @@ on:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_mobile:
|
bump_version:
|
||||||
uses: ./.github/workflows/build-mobile.yml
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
tag_release:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build_mobile
|
|
||||||
|
outputs:
|
||||||
|
ref: ${{ steps.push-tag.outputs.commit_long_sha }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -36,6 +34,7 @@ jobs:
|
||||||
run: misc/release/pump-version.sh -s "${{ inputs.serverBump }}" -m "${{ inputs.mobileBump }}"
|
run: misc/release/pump-version.sh -s "${{ inputs.serverBump }}" -m "${{ inputs.mobileBump }}"
|
||||||
|
|
||||||
- name: Commit and tag
|
- name: Commit and tag
|
||||||
|
id: push-tag
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
author_name: Immich Release Bot
|
author_name: Immich Release Bot
|
||||||
|
@ -43,7 +42,19 @@ jobs:
|
||||||
message: "Version ${{ env.IMMICH_VERSION }}"
|
message: "Version ${{ env.IMMICH_VERSION }}"
|
||||||
tag: ${{ env.IMMICH_VERSION }}
|
tag: ${{ env.IMMICH_VERSION }}
|
||||||
push: true
|
push: true
|
||||||
|
|
||||||
|
build_mobile:
|
||||||
|
uses: ./.github/workflows/build-mobile.yml
|
||||||
|
needs: bump_version
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.bump_version.outputs.ref }}
|
||||||
|
|
||||||
|
prepare_release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build_mobile
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: Download APK
|
- name: Download APK
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Add table
Reference in a new issue