Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial impl, with Github Actions setup
- Loading branch information
Showing
24 changed files
with
1,762 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[*.{kt,kts}] | ||
indent_size = 2 | ||
insert_final_newline = true | ||
max_line_length = off |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
TAG_TIMESTAMP=$(git log $LATEST_PUBLISHED_VERSION --pretty="format:%ct" | head -1) | ||
hub pr list --limit 500 --base main -s merged --format='%mt#%au#[%i](%U) %t%n' > PR-list-all.txt | ||
while read line; do | ||
pr_timestamp=$(echo $line | cut -d# -f1) | ||
if [ $pr_timestamp -gt $TAG_TIMESTAMP ]; then | ||
contribution=$(echo $line | cut -d# -f3- | perl -pe 's/^/ - /') | ||
contributor=$(echo $line | cut -d# -f2) | ||
echo "$contribution - [@$contributor](https://github.com/$contributor)" | ||
fi | ||
done < PR-list-all.txt > local-release-notes.txt | ||
|
||
echo -e "Release $RELEASE_VERSION\n\n" > release-notes.txt | ||
echo -e "$RELEASE_VERSION ($(date +%Y-%m-%d))\n---" >> release-notes.txt | ||
cat local-release-notes.txt >> release-notes.txt | ||
|
||
echo -e "\n--- RELEASE NOTES ---\n" | ||
cat release-notes.txt | ||
hub release create --copy -F release-notes.txt $RELEASE_VERSION |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: generate-alpha-tag | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Gradle build | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: --full-stacktrace build "-Psemver.stage=alpha" | ||
|
||
- name: Stop Gradle daemons | ||
run: ./gradlew --stop | ||
|
||
generate-alpha-tag: | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- build | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.TOKEN_GITHUB_ACTION }} | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Generate Tag | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: --full-stacktrace createSemverTag "-Psemver.stage=alpha" | ||
|
||
- name: Push | ||
run: git push --follow-tags | ||
|
||
- name: Stop Gradle daemons | ||
run: ./gradlew --stop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: generate-tag | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: [main] | ||
inputs: | ||
stage: | ||
description: 'Stage' | ||
required: true | ||
default: 'auto' | ||
type: choice | ||
options: | ||
- 'alpha' | ||
- 'beta' | ||
- 'rc' | ||
- 'final' | ||
- 'auto' | ||
scope: | ||
description: 'Scope' | ||
required: true | ||
default: 'auto' | ||
type: choice | ||
options: | ||
- 'minor' | ||
- 'major' | ||
- 'auto' | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Gradle build | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: --full-stacktrace build "-Psemver.scope=${{ github.event.inputs.scope }}" "-Psemver.stage=${{ github.event.inputs.stage }}" | ||
|
||
- name: Stop Gradle daemons | ||
run: ./gradlew --stop | ||
|
||
generate-tag: | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- build | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.TOKEN_GITHUB_ACTION }} | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Generate Tag | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: --full-stacktrace createSemverTag "-Psemver.scope=${{ github.event.inputs.scope }}" "-Psemver.stage=${{ github.event.inputs.stage }}" | ||
|
||
- name: Push | ||
run: git push --follow-tags | ||
|
||
- name: Stop Gradle daemons | ||
run: ./gradlew --stop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: "Publish" | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }} | ||
OSS_USER: '${{ secrets.OSS_USER }}' | ||
OSS_TOKEN: '${{ secrets.OSS_TOKEN }}' | ||
OSS_STAGING_PROFILE_ID: '${{ secrets.OSS_STAGING_PROFILE_ID }}' | ||
SIGNING_KEY_NAME: '${{ secrets.SIGNING_KEY_NAME }}' | ||
SIGNING_KEY_ID: '${{ secrets.SIGNING_KEY_ID }}' | ||
SIGNING_KEY_PASSPHRASE: '${{ secrets.SIGNING_KEY_PASSPHRASE }}' | ||
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}' | ||
|
||
jobs: | ||
publish: | ||
timeout-minutes: 150 | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: build --full-stacktrace | ||
|
||
- name: Get Arrow version | ||
id: version | ||
run: echo "::set-output name=arrow::$(head -n 1 build/semver/version.txt)" | ||
|
||
- name: Upload reports | ||
uses: actions/upload-artifact@v3.1.0 | ||
with: | ||
name: 'reports-${{ matrix.os }}' | ||
path: '**/build/reports/**' | ||
|
||
- name: Publish alpha/beta/rc version | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
if: | | ||
contains(steps.version.outputs.arrow, 'alpha') || | ||
contains(steps.version.outputs.arrow, 'beta') || | ||
contains(steps.version.outputs.arrow, 'rc') | ||
with: | ||
arguments: --full-stacktrace publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
|
||
- name: Publish final version | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
if: | | ||
!contains(steps.version.outputs.arrow, 'alpha') && | ||
!contains(steps.version.outputs.arrow, 'beta') && | ||
!contains(steps.version.outputs.arrow, 'rc') | ||
with: | ||
arguments: --full-stacktrace publishToSonatype closeSonatypeStagingRepository |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: "pull_request" | ||
|
||
on: pull_request | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ 'macos-latest', 'ubuntu-latest', 'windows-latest' ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.0.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: build | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: --full-stacktrace build | ||
|
||
- name: Upload reports | ||
uses: actions/upload-artifact@v3.1.0 | ||
with: | ||
name: 'reports-${{ matrix.os }}' | ||
path: '**/build/reports/**' | ||
|
||
- name: Stop Gradle daemons | ||
run: ./gradlew --stop | ||
|
||
update_api: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3.4.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2.2.1 | ||
with: | ||
arguments: apiDump | ||
|
||
- name: Stop Gradle daemons | ||
run: ./gradlew --stop | ||
|
||
- name: "Commit new API files" | ||
uses: stefanzweifel/git-auto-commit-action@v4.14.1 | ||
with: | ||
commit_message: Update API files | ||
file_pattern: arrow-libs/**/api/*.api |
Oops, something went wrong.