Skip to content

Commit

Permalink
Update pipeline tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
reline committed May 7, 2024
1 parent e5d4a45 commit ce68184
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@ name: CI

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: read

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle
run: ./gradlew build
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle
run: ./gradlew build publish
- name: Publish
run: ./gradlew build publishAndReleaseToMavenCentral --no-configuration-cache

- name: Get Release Version
shell: bash
run: |
version=$(./gradlew --no-daemon -q :library:properties --property version | grep "^version:" | awk '{printf $2}')
version=$(./gradlew --no-daemon -q :sqlitecopyopenhelper:properties --property version | grep "^version:" | awk '{printf $2}')
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV
- name: Create Release
Expand Down

0 comments on commit ce68184

Please sign in to comment.