chore(deps): update dependency sbt/sbt to v1.10.2 #283
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: CI and CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
ci: | |
name: Build, Lint and Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java and Cache deps | |
uses: ./.github/actions/setup-build | |
- name: Check format with Scalafmt | |
run: sbt scalafmtCheckAll | |
- name: Check lint with Scalafix | |
run: sbt "scalafix --check" | |
- name: Build artifact with Test | |
run: sbt assembly | |
- name: Clean build artifact for caching target folder | |
run: rm -r ./target/scala-*/RegenerateWorld-*.jar | |
cd: | |
name: Release | |
runs-on: ubuntu-22.04 | |
needs: ci | |
if: github.ref == 'refs/heads/main' | |
# softprops/action-gh-release requires this permisson | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java and Cache deps | |
uses: ./.github/actions/setup-build | |
- name: Conventional Changelog Action | |
uses: TriPSs/[email protected] | |
id: changelog | |
with: | |
github-token: ${{ secrets.github_token }} | |
git-user-name: "github-actions[bot]" | |
git-user-email: "github-actions[bot]@users.noreply.github.com" | |
skip-version-file: 'true' | |
skip-git-pull: 'true' | |
# バージョンが異なっているので、再度Build | |
- name: Build artifact | |
run: sbt assembly | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
with: | |
body: ${{ steps.changelog.outputs.clean_changelog }} | |
tag_name: ${{ steps.changelog.outputs.tag }} | |
files: ./target/scala-*/RegenerateWorld-*.jar | |
- name: Clean build artifact for caching target folder | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
run: rm -r ./target/scala-*/RegenerateWorld-*.jar |