Skip to content
Snippets Groups Projects
Verified Commit 43ac00df authored by Griefed's avatar Griefed :joystick:
Browse files

ci(branches): Add different branches to releases and tests, so people can...

ci(branches): Add different branches to releases and tests, so people can download the different examples and use them.
parent a91ddd8f
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,158 @@ jobs:
- name: List files
run: ls -ahl build/libs
# UPLOAD ASSETS TO RELEASE
- name: Upload Release Asset Main Jar
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar
asset_content_type: application/jar
- name: Upload Release Asset Sources Jar
id: upload-release-asset-sources
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar
asset_content_type: application/jar
- name: Upload Release Asset Javadoc Jar
id: upload-release-asset-javadoc
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar
asset_content_type: application/jar
alternative:
runs-on: ubuntu-latest
steps:
# GET LATEST CODE
- name: Checkout latest code
uses: actions/checkout@master
with:
ref: alternativeExtensionDeclaration
fetch-depth: 0
# EXTRACT TAG FROM PUSH
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Use tag
run: echo ${{steps.tag.outputs.tag}}
# GENERATE CHANGELOG, RELEASE
- id: conventional_changelog
uses: ardalanamini/auto-changelog@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
# BUILD PROJECT AND PUBLISH TO PACKAGES
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to GitHub Packages
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(echo "${{steps.tag.outputs.tag}}")
echo "New version: ${NEW_VERSION}"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew about
./gradlew -Pversion=${NEW_VERSION} publish --info -x test
- name: List files
run: ls -ahl build/libs
# UPLOAD ASSETS TO RELEASE
- name: Upload Release Asset Main Jar
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar
asset_content_type: application/jar
- name: Upload Release Asset Sources Jar
id: upload-release-asset-sources
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar
asset_content_type: application/jar
- name: Upload Release Asset Javadoc Jar
id: upload-release-asset-javadoc
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar
asset_content_type: application/jar
tetris:
runs-on: ubuntu-latest
steps:
# GET LATEST CODE
- name: Checkout latest code
uses: actions/checkout@master
with:
ref: tetris
fetch-depth: 0
# EXTRACT TAG FROM PUSH
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Use tag
run: echo ${{steps.tag.outputs.tag}}
# GENERATE CHANGELOG, RELEASE
- id: conventional_changelog
uses: ardalanamini/auto-changelog@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
# BUILD PROJECT AND PUBLISH TO PACKAGES
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to GitHub Packages
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(echo "${{steps.tag.outputs.tag}}")
echo "New version: ${NEW_VERSION}"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew about
./gradlew -Pversion=${NEW_VERSION} publish --info -x test
- name: List files
run: ls -ahl build/libs
# UPLOAD ASSETS TO RELEASE
- name: Upload Release Asset Main Jar
id: upload-release-asset
......
......@@ -6,10 +6,80 @@ on:
workflow_dispatch:
jobs:
test:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Where is Java
run: which java
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew about build --no-daemon --info
- name: List files in libs
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
with:
name: build-artifacts-gradle
path: |
build/libs/
!build/libs/libraries/
frontend/dist/spa
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
if: failure()
with:
name: report
path: build/reports/tests/test/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
alternative:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: alternativeExtensionDeclaration
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Where is Java
run: which java
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew about build --no-daemon --info
- name: List files in libs
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
with:
name: build-artifacts-gradle
path: |
build/libs/
!build/libs/libraries/
frontend/dist/spa
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
if: failure()
with:
name: report
path: build/reports/tests/test/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
tetris:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: tetris
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment