diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index f6891d3..582832c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -46,6 +46,11 @@ jobs: echo "tag=$INPUT_RELEASE_TAG" >> "$GITHUB_OUTPUT" fi + - name: Apply release version + env: + RELEASE_TAG: ${{ steps.release.outputs.tag }} + run: npm pkg set "version=$RELEASE_TAG" + - name: Check code run: npm run lint diff --git a/.github/workflows/publish-component.yml b/.github/workflows/publish-component.yml index 2ec6000..78e0f8a 100644 --- a/.github/workflows/publish-component.yml +++ b/.github/workflows/publish-component.yml @@ -7,6 +7,10 @@ on: description: Framework branch containing the release templates required: true type: string + release_tag: + description: Component tag that provides the package version + required: true + type: string dry_run: description: Validate the package without publishing it required: false @@ -40,6 +44,11 @@ jobs: - name: Install dependencies run: npm install --package-lock=false + - name: Apply release version + env: + RELEASE_TAG: ${{ inputs.release_tag }} + run: npm pkg set "version=$RELEASE_TAG" + - name: Apply release TypeScript configuration run: cp framework/templates/component-release/tsconfig.json tsconfig.json diff --git a/src/packages/contracts/.github/workflows/publish.yml b/src/packages/contracts/.github/workflows/publish.yml index d217ed3..a93fae5 100644 --- a/src/packages/contracts/.github/workflows/publish.yml +++ b/src/packages/contracts/.github/workflows/publish.yml @@ -6,6 +6,10 @@ on: - '*' workflow_dispatch: inputs: + release_tag: + description: Component tag that provides the package version + required: true + type: string dry_run: description: Validate the package without publishing it required: true @@ -21,5 +25,6 @@ jobs: uses: koala-ts/framework/.github/workflows/publish-component.yml@2.x with: framework_ref: 2.x + release_tag: ${{ inputs.release_tag || github.ref_name }} dry_run: ${{ inputs.dry_run || false }} secrets: inherit