Update ruby/setup-ruby action to v1.194.0 - autoclosed #495
Workflow file for this run
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 workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: | |
push: | |
branches: [ master, dev ] | |
pull_request: | |
branches: [ master, dev ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name : Checkout Repo | |
uses: actions/[email protected] | |
with: | |
fetch-depth: '5' | |
- name: Manage Version | |
run: | | |
echo "JEKYLL_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
git fetch --prune --unshallow --tags | |
GIT_SHA="$(git rev-parse --short HEAD)" | |
CUR_TAG="$(git tag -l | grep 'alpha' | tail -1)" | |
echo "SHORT_SHA=$GIT_SHA" >> $GITHUB_ENV | |
DATE_CURRENT="$(date +'%Y%m%d')" | |
echo "DATE=$DATE_CURRENT" >> $GITHUB_ENV | |
if [[ -z $CUR_TAG ]]; then | |
echo "OLD_PRE_TAG=NULL" >> $GITHUB_ENV | |
else | |
echo "OLD_PRE_TAG=$CUR_TAG" >> $GITHUB_ENV | |
fi | |
- name: Setuping Node latest version | |
uses: actions/[email protected] | |
with: | |
node-version: '16' | |
check-latest: true | |
- name: Set up JDK 8 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 8 | |
cache: maven | |
- name: Setup Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Test Compile Site & Project GUI | |
run: JEKYLL_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run test-build && npm run test-site | |
- name: Build Project GUI | |
run: npm run build | |
- name: Preparing Artifact | |
run: "sudo cp target/SSBPN-1.4-alpha-jar-with-dependencies.jar SSBPN-1.4-alpha.jar" | |
- name: Generate Prerelease Release Notes | |
run: | | |
echo '### Disclaimer:' >> ReleaseNotes.md | |
echo '***This alpha version is for testing only.***' >> ReleaseNotes.md | |
echo 'It is not ready for daily use and we do not guarantee its usability.' >> ReleaseNotes.md | |
echo '### The latest five updates are:' >> ReleaseNotes.md | |
git log -"5" --format="- %H %s" | sed '/^$/d' >> ReleaseNotes.md | |
if: github.event_name != 'pull_request' | |
- name: Delete Old Pre-Release | |
uses: dev-drprasad/[email protected] | |
with: | |
tag_name: ${{ env.OLD_PRE_TAG }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: github.event_name != 'pull_request' | |
- name: Publish GitHub Release | |
uses: ncipollo/[email protected] | |
with: | |
name: "bpn v1.4-alpha ${{ env.SHORT_SHA }}" | |
prerelease: true | |
draft: false | |
bodyFile: 'ReleaseNotes.md' | |
tag: "v1.4-alpha" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "SSBPN-1.4-alpha.jar" | |
generateReleaseNotes: true | |
if: github.event_name != 'pull_request' | |
- name: Upload to Artifacts | |
uses: actions/[email protected] | |
with: | |
name: Release Artifacts | |
path: "SSBPN-1.4-alpha.jar" | |
- name: Clean project | |
run: npm run clean | |