From c1f27c53723424967782e6ede2bf07e71edb8467 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 20 Nov 2023 14:51:30 -0800 Subject: [PATCH] Update Github Actions to node20 (#121) Also ensure CI only runs on pushes to main and tags. --- .github/workflows/template-cleanup.yml | 6 ++++-- .github/workflows/test.yml | 21 +++++++++++---------- .mill-version | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 .mill-version diff --git a/.github/workflows/template-cleanup.yml b/.github/workflows/template-cleanup.yml index 84850cc2..b1540042 100644 --- a/.github/workflows/template-cleanup.yml +++ b/.github/workflows/template-cleanup.yml @@ -16,7 +16,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + persist-credentials: false - name: Cleanup run: | @@ -49,7 +51,7 @@ jobs: git commit -m "Template cleanup" - name: Push changes - uses: ad-m/github-push-action@v0.6.0 + uses: ad-m/github-push-action@v0.8.0 with: branch: main github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cea806d..62b8c1ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,10 @@ name: Continuous Integration -on: [push, pull_request] +on: + push: + tags: ['*'] + branches: ['main'] + pull_request: jobs: ci: @@ -8,19 +12,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cleanup run: sed -i "s/%NAME%/test/g" build.sc + - name: Cache Scala + uses: coursier/cache-action@v6 - name: Setup Scala - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.8 - - name: Setup Mill - uses: jodersky/setup-mill@v0.2.3 + uses: coursier/setup-action@v1 with: - mill-version: 0.9.7 - - name: Cache Scala - uses: coursier/cache-action@v5 + jvm: adopt:11 + apps: sbt mill - name: SBT Test run: sbt test - name: mill Test diff --git a/.mill-version b/.mill-version new file mode 100644 index 00000000..62d5dbdf --- /dev/null +++ b/.mill-version @@ -0,0 +1 @@ +0.11.5