Skip to content

Commit

Permalink
set version from tag
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Jan 24, 2025
1 parent 3c441d5 commit 52c7c5b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ jobs:
java-version: 17
cache: 'gradle'

- name: Build SDK
- name: Derive version from tag
id: set-version
run: |
# github.ref_name might be "v1.0.0"
VERSION="${GITHUB_REF_NAME#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build SDK
run: |
echo "Building Lantern SDK version $VERSION"
make build-sdk VERSION=$VERSION
Expand All @@ -43,6 +49,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
name: "Release ${{ github.ref_name }}"
body: "Automated release for version ${{ github.ref_name }}"
artifacts: "build/lanternsdk-android-${{ github.ref_name#v }}.aar"
body: "Automated release for version ${{ env.VERSION }}"
artifacts: "build/lanternsdk-android-${{ env.VERSION }}.aar"
artifact_content_type: "application/zip"

0 comments on commit 52c7c5b

Please sign in to comment.