Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit 3eb6854

Browse files
committed
ci: fix version not passed correctly
1 parent 891ccc8 commit 3eb6854

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/config/pre_changelog_hook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports.preVersionGeneration = (version) => {
66
core.info(`Computed version bump: ${version}`);
77

88
const newVersion = semver.valid(VERSION);
9-
if (newVersion && semver.gte(newVersion, version)) {
9+
if (newVersion) {
1010
version = newVersion;
1111
core.info(`Using provided version: ${version}`);
1212
}

.github/workflows/cd.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: "Check if release needed"
22

33
on:
44
workflow_call:
5+
inputs:
6+
version:
7+
description: New version to release
8+
required: false
9+
type: string
510

611
jobs:
712
cd:
@@ -36,7 +41,7 @@ jobs:
3641
pre-commit: '.github/config/pre_commit_hook.js'
3742
pre-changelog-generation: '.github/config/pre_changelog_hook.js'
3843
env:
39-
VERSION: ${{ github.event.inputs.version }}
44+
VERSION: ${{ inputs.version }}
4045

4146
- name: Build package products and documentation
4247
if: steps.conventional_changelog.outputs.skipped == 'false'

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ jobs:
7575
(needs.ci.result == 'success' || needs.ci.result == 'skipped'))
7676
needs: [ci, analyze, swift-package-test, xcode-test, cocoapods-test]
7777
uses: ./.github/workflows/cd.yml
78+
with:
79+
version: ${{ github.event.inputs.version }}
7880
secrets: inherit

0 commit comments

Comments
 (0)