-
Notifications
You must be signed in to change notification settings - Fork 15
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
4 changed files
with
160 additions
and
101 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
.github/workflows/lint.yml → .github/workflows/check_version.yml
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
name: lint | ||
# Check if version number has been updated | ||
|
||
name: Version Check | ||
on: pull_request | ||
|
||
jobs: | ||
|
This file was deleted.
Oops, something went wrong.
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,156 @@ | ||
name: Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
find_version: | ||
name: Find Release Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.step_find.outputs.RELEASE_VERSION }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: 'maven' | ||
- name: 'Find velease version' | ||
run: echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT | ||
id: step_find | ||
|
||
deploy_to_maven: | ||
name: Deploy to Maven Repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: 'maven' | ||
- name: Publish package | ||
run: mvn --batch-mode deploy -Dmaven.test.skip=true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: 'Upload artifact' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
if-no-files-found: error | ||
name: 'iguana-jar' | ||
path: 'target/' | ||
|
||
|
||
compile_native: | ||
name: Compile Native Executable | ||
runs-on: ubuntu-latest | ||
needs: find_version | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '21' | ||
cache: 'maven' | ||
- name: 'Generate configuration files' | ||
run: './graalvm/generate-config.sh' | ||
- name: 'Compile native-binary' | ||
run: 'mvn -DskipTests package -Pnative' | ||
- name: 'Upload artifact' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: 'iguana-native' | ||
path: 'target/iguana-${{ needs.find_version.outputs.RELEASE_VERSION }}' | ||
if-no-files-found: error | ||
|
||
deploy_docs: | ||
name: Deploy Documentation | ||
runs-on: ubuntu-latest | ||
needs: find_version | ||
env: | ||
- RELEASE_VERSION: ${{ needs.find_version.outputs.RELEASE_VERSION }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: 'maven' | ||
with: | ||
python-version: 3.x | ||
cache: 'pip' | ||
- run: pip install mkdocs-material | ||
- run: pip install mkdocs-macros-plugin | ||
- run: sed -i "s/\$VERSION/${{ env.RELEASE_VERSION }}/g" mkdocs.yml | ||
- run: sed -i "s/\$RELEASE_VERSION/${{ env.RELEASE_VERSION }}/g" mkdocs.yml | ||
- run: mkdocs build -d site/${{ env.RELEASE_VERSION }} | ||
- run: mvn javadoc:javadoc | ||
- run: sed -i "s/\$VERSION/${{ env.RELEASE_VERSION }}/g" .github/pages/latest.html | ||
- run: sed -i "s/\$VERSION/${{ env.RELEASE_VERSION }}/g" .github/pages/javadoc-latest.html | ||
- name: Deploy Site | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site/${{ env.RELEASE_VERSION }} | ||
destination_dir: ./docs/${{ env.RELEASE_VERSION }} | ||
- name: Deploy Javadoc | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./javadoc/${{ env.RELEASE_VERSION }} | ||
destination_dir: ./javadoc/${{ env.RELEASE_VERSION }} | ||
- name: Deploy latest.html | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: .github/pages/ | ||
keep_files: true | ||
destination_dir: ./docs/ | ||
- name: Deploy latest.html | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: .github/pages/ | ||
keep_files: true | ||
destination_dir: ./docs/ | ||
|
||
deploy_gh_release: | ||
runs-on: ubuntu-latest | ||
needs: [compile-jar, deploy_to_maven, find_version] | ||
env: | ||
- RELEASE_VERSION: ${{ needs.find_version.outputs.RELEASE_VERSION }} | ||
|
||
steps: | ||
- name: Download artifacts from previous jobs | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts/ | ||
merge-multiple: true | ||
- name: Prepare files | ||
run: | | ||
mkdir iguana | ||
cp artifacts/start-iguana.sh iguana/ | ||
cp artifacts/iguana-${{ env.RELEASE_VERSION }}.jar iguana/iguana-${{ env.RELEASE_VERSION }}.jar | ||
cp artifacts/iguana-${{ env.RELEASE_VERSION }} iguana/iguana-${{ env.RELEASE_VERSION }} | ||
cp example-suite.yml iguana/ | ||
zip -r iguana-${{ env.RELEASE_VERSION }}.zip iguana/ | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: v${{ env.RELEASE_VERSION }} | ||
name: version ${{ env.RELEASE_VERSION }} | ||
draft: false | ||
prerelease: false | ||
body: "" | ||
fail_on_unmatched_files: true | ||
make_latest: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
iguana-${{ env.RELEASE_VERSION }}.zip | ||
artifacts/iguana-${{ env.RELEASE_VERSION }}.jar | ||
artifacts/iguana-${{ env.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: testing | ||
name: Tests | ||
|
||
on: | ||
push: | ||
|