-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
105 additions
and
56 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,27 @@ | ||
name: Build plugin | ||
description: Builds the plugin | ||
inputs: | ||
java_version: | ||
required: true | ||
description: Java version for building the plugin | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: 'Set up JDK ${{ inputs.java_version }}' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ inputs.java_version }} | ||
- name: Test | ||
shell: bash | ||
run: | | ||
./mvnw --color=always -B verify | ||
- uses: actions/upload-artifact@v3 | ||
name: Attach generated update site as zip | ||
if: runner.os == 'ubuntu-latest' | ||
with: | ||
name: mat-calcite-plugin-update-site | ||
# actions/upload-artifact always creates .zip, so we specify directory here to prevent double zip archiving | ||
path: MatCalciteRepository/target/repository/* | ||
# Default retention is 90 days, and we publish the archives to the update site anyway | ||
retention-days: 4 |
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,12 @@ | ||
name: Caches Maven dependencies | ||
description: Caches Maven dependencies | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- |
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
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,60 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: 'Release version' | ||
required: true | ||
next_version: | ||
description: 'Next version to set after release (without -SNAPSHOT)' | ||
required: true | ||
|
||
jobs: | ||
release-job: | ||
permissions: | ||
# For creating releases | ||
contents: write | ||
env: | ||
RELEASE_VERSION: ${{ inputs.release_version }} | ||
NEXT_VERSION: ${{ inputs.next_version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
uses: ./.github/actions/cache | ||
- name: Update version to stable | ||
shell: bash | ||
run: | | ||
./mvnw tycho-versions:set-version -DnewVersion=$RELEASE_VERSION | ||
git add -u | ||
git commit -m "Prepare for release v$RELEASE_VERSION" | ||
git tag v$RELEASE_VERSION | ||
- name: Build | ||
uses: ./.github/actions/build | ||
with: | ||
java_version: ${{ matrix.java }} | ||
- name: Publish release | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 | ||
with: | ||
tag_name: v${{ inputs.next_version }} | ||
generate_release_notes: true | ||
draft: true | ||
files: | | ||
MatCalciteRepository/target/MatCalciteRepository*.zip | ||
- name: Publish Eclipse update site | ||
if: github.repository == 'vlsi/mat-calcite-plugin' | ||
uses: ./.github/actions/publish-update-site | ||
with: | ||
update_site_token: | ||
${{ secrets.UPDATE_SITE_TOKEN }} | ||
- name: Prepare for next development iteration | ||
shell: bash | ||
run: | | ||
./mvnw tycho-versions:set-version -DnewVersion=$NEXT_VERSION-SNAPSHOT | ||
git add -u | ||
git commit -m "Update version to $NEXT_VERSION-SNAPSHOT" | ||
git push origin main v$RELEASE_VERSION | ||
This file was deleted.
Oops, something went wrong.