Bradleycorn
11/04/2023, 9:35 PMall-publish
workflow to add an additional step after the publish that creates a release in my github repo. I’d like to have it set the name of the release to the tag/version number that was used when the first step published all of the packages. Is there some way to get the tag/version number that the “default github workflow” uses to publish? My workflow file is posted in the 🧵name: Publish All
on:
workflow_dispatch:
# push:
# branches:
# - "main"
jobs:
kmmbridge-publish:
permissions:
contents: write
packages: write
steps:
- name: Publish
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@v1.0
with:
jvmVersion: 17
versionBaseProperty: LIBRARY_VERSION
publishTask: kmmBridgePublish publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository
# secrets:
# PODSPEC_SSH_KEY: ${{ secrets.PODSPEC_SSH_KEY }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
updateOnlyUnreleased: true
draft: false
commit: ${{ github.ref_name }}
tag: ???? I need the tag that was created in the previous step
name: ?? I need the version (or tag) that was created in the previous step
omitBodyDuringUpdate: true
bodyFile: "These are some release notes ... "
- uses: touchlab/read-property@0.1
id: versionBasePropertyValue
with:
file: ./gradle.properties
property: ${{ inputs.versionBaseProperty }}
- uses: touchlab/autoversion-nextversion@main
id: autoversion
with:
versionBase: ${{ steps.versionBasePropertyValue.outputs.propVal }}
// Then in my create release step I could use:
${{ steps.autoversion.outputs.nextVersion }}