Merge pull request #20 from anadelarosa3/ana-fix-main-head-1 #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release on SDK version change | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
version-change: | |
name: Check for version change | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.check.outputs.version }} | |
version_changed: ${{ steps.check.outputs.version_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check | |
id: check | |
run: | | |
if ! git diff --exit-code HEAD~1 HEAD platform/shared/.sdk_version; then | |
echo "Detected changes..." | |
echo "version=$(cat platform/shared/.sdk_version)" >> $GITHUB_OUTPUT | |
echo "version_changed=true" >> $GITHUB_OUTPUT | |
fi | |
release: | |
permissions: | |
id-token: write # required to use OIDC authentication | |
contents: write | |
uses: ./.github/workflows/release.yaml | |
if: needs.version-change.outputs.version_changed == 'true' | |
with: | |
version: ${{ needs.version-change.outputs.version }} | |
emergency: false | |
secrets: inherit | |
needs: version-change |