Skip to content

Commit

Permalink
fix: env variables in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
morisil committed Aug 29, 2024
1 parent 6abb1bc commit 1fb17be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,21 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build
run: ./gradlew -Pversion=${VERSION} build sourcesJar javadocJar publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_githubActor: ${{ secrets.GITHUBACTOR }}
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUBTOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUser: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew -Pversion=$VERSION build sourcesJar javadocJar publishToSonatype closeAndReleaseSonatypeStagingRepository

- name: Find branch from tag
id: find-branch
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: |
BRANCH=$(git branch -r --contains ${{ github.event.release.tag_name }} | grep -v '\->' | sed 's/origin\///' | head -n 1)
BRANCH=$(git branch -r --contains $TAG_NAME | grep -v '\->' | sed 's/origin\///' | head -n 1)
if [ -z "$BRANCH" ]; then
echo "Branch not found for tag $TAG"
exit 1
Expand All @@ -55,7 +57,7 @@ jobs:
run: git checkout ${BRANCH}

- name: Update README
run: sed -i 's/com\.xemantic\.kotlin:xemantic-kotlin-swing-dsl-\(core\|test\):[0-9]\+\(\.[0-9]\+\)*\>/com.xemantic.kotlin:xemantic-kotlin-swing-dsl-\1:${{ VERSION }}/g' README.md
run: sed -i 's/com\.xemantic\.kotlin:xemantic-kotlin-swing-dsl-\(core\|test\):[0-9]\+\(\.[0-9]\+\)*\>/com.xemantic.kotlin:xemantic-kotlin-swing-dsl-\1:$VERSION/g' README.md

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
Expand Down

0 comments on commit 1fb17be

Please sign in to comment.