Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: publish artifacts #34

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/actions/publish-update-site/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish update site
description: Publishes the updated update-site
inputs:
update_site_token:
required: true
description: GitHub token for publishing
runs:
using: "composite"
steps:
- name: Checkout update site
uses: actions/checkout@v4
with:
repository: vlsi/mat-calcite-plugin-update-site
path: MatCalciteRepository/target/mat-calcite-plugin-update-site
token: ${{ inputs.update_site_token }}
- name: Publish
shell: bash
run: |
PLUGIN_VERSION=$(./mvnw help:evaluate -q -DforceStdout -D"expression=project.version")
cd MatCalciteRepository/target
# git clone https://github.com/vlsi/mat-calcite-plugin-update-site.git
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
if [ -z ${i##*-SNAPSHOT} ]; then
REPO=ea
else
REPO=stable
fi
DIR=mat-calcite-plugin-update-site/$REPO
rm -rf $DIR
# Copy "repository" recursively as "ea" or "stable" folder
cp -R repository $DIR
cd mat-calcite-plugin-update-site
# Restore the deleted readme, so the browser can display it
git checkout $REPO/README.md
git add -A
git commit -m "Update site for ${PLUGIN_VERSION}, ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}"
git push

18 changes: 16 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache local Maven repository
uses: actions/cache@v3
with:
Expand All @@ -41,4 +41,18 @@ jobs:
- name: Test
run: |
./mvnw --color=always -B verify

- uses: actions/upload-artifact@v3
name: Attach generated update site as zip
if: matrix.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
- name: Publish Eclipse update site
if: matrix.os == 'ubuntu-latest' && github.repository == 'vlsi/mat-calcite-plugin' && github.ref == 'refs/heads/main'
uses: ./.github/actions/publish-update-site
with:
update_site_token:
${{ secrets.UPDATE_SITE_TOKEN }}
194 changes: 0 additions & 194 deletions MatCalciteRepository/bintray.ant

This file was deleted.

97 changes: 0 additions & 97 deletions MatCalciteRepository/packaging-p2composite.ant

This file was deleted.

Loading