SST-102 Fixed automatic membership valid to date population regardles… #31
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
name: Publish SNAPSHOT | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
**/node_modules | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: 11-node-${{ hashFiles('**/package-lock.json') }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: 11- | |
- name: Get SNAPSHOT version ids | |
uses: castlabs/get-package-version-id-action@v2.0 | |
id: version | |
with: | |
version: "99-SNAPSHOT" | |
- name: Delete SNAPSHOT versions | |
uses: actions/delete-package-versions@v2.0.2 | |
if: ${{ steps.version.outputs.ids != '' }} | |
with: | |
package-version-ids: "${{ steps.version.outputs.ids }}" | |
- name: Publish artifacts | |
run: ./gradlew clean server:publish server-api:publish types:publish -x test | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "server/build/distributions/onCourseServer-*" | |
allowUpdates: true | |
generateReleaseNotes: true | |
commit: main | |
tag: '99-SNAPSHOT' | |
token: ${{ secrets.GITHUB_TOKEN }} |