Skip to content

Commit a938430

Browse files
committed
Update github action settings
1 parent b79f1ab commit a938430

File tree

3 files changed

+67
-42
lines changed

3 files changed

+67
-42
lines changed

.github/workflows/bump.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
name: Bump version
1+
name: Bump Version
22
on:
3-
workflow_dispatch
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *'
46
jobs:
5-
build:
6-
runs-on: ubuntu-latest
7+
bump-version:
8+
runs-on: ubuntu-20.04
79
steps:
8-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v2.3.4
911
with:
10-
fetch-depth: '0'
12+
fetch-depth: 0
13+
persist-credentials: false
14+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
1115
- name: Bump version and push tag
12-
uses: anothrNick/[email protected]
16+
id: tag_version
17+
uses: mathieudutour/[email protected]
18+
with:
19+
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
20+
- name: Create a GitHub release
21+
uses: actions/create-release@v1
1322
env:
14-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
WITH_V: true
16-
DEFAULT_BUMP: patch
17-
RELEASE_BRANCHES: main
23+
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
24+
with:
25+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
26+
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
27+
body: ${{ steps.tag_version.outputs.changelog }}

.github/workflows/ci.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@ name: CI
22
on:
33
push:
44
branches: [ main ]
5-
tags: ["*"]
65
pull_request:
76
branches: [ main ]
7+
schedule:
8+
- cron: '0 0 * * *'
89
jobs:
910
build:
10-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1112
env:
1213
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1314
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
14-
AWS_REGION: "ap-northeast-1"
15-
TEST_TIME_FACTOR: "5"
15+
AWS_REGION: ap-northeast-1
16+
TEST_TIME_FACTOR: 3
1617
steps:
17-
- uses: actions/checkout@v2
18-
- name: Set up Scala
19-
uses: olafurpg/setup-scala@v10
18+
- uses: actions/[email protected]
19+
with:
20+
fetch-depth: 0
21+
- uses: olafurpg/setup-scala@v10
2022
with:
2123
java-version: "[email protected]"
22-
- name: Coursier cache
23-
uses: coursier/cache-action@v5
24-
- name: Build and test
24+
- uses: coursier/cache-action@v5
25+
- run: sbt -v scalafmtCheckAll
26+
- run: sbt -v +compile
27+
- run: sbt -v +test
28+
- name: clean up
2529
run: |
26-
sbt -v clean scalafmtCheckAll +test
2730
rm -rf "$HOME/.ivy2/local" || true
2831
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
2932
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true

.github/workflows/release.yml

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
name: Release
22
on:
3-
workflow_run:
4-
workflows: ["CI"]
5-
types: [completed]
63
push:
7-
branches: [main]
8-
tags: ["*"]
4+
branches: [ main ]
5+
tags:
6+
- v[1-9]+.[0-9]+.[0-9]+
97
jobs:
10-
publish:
8+
release:
119
runs-on: ubuntu-20.04
12-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
10+
env:
11+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
12+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
13+
AWS_REGION: ap-northeast-1
14+
TEST_TIME_FACTOR: 3
1315
steps:
14-
- uses: actions/[email protected]
15-
with:
16-
fetch-depth: 0
17-
ref: ${{ github.event.workflow_run.head_branch }}
18-
- uses: olafurpg/setup-scala@v10
19-
- uses: olafurpg/setup-gpg@v3
20-
- run: |
21-
sbt ci-release
22-
env:
23-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
24-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
25-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
26-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
16+
- uses: actions/[email protected]
17+
with:
18+
fetch-depth: 0
19+
- uses: olafurpg/setup-scala@v10
20+
with:
21+
java-version: "[email protected]"
22+
- uses: coursier/cache-action@v5
23+
- uses: olafurpg/setup-gpg@v3
24+
- run: sbt -v scalafmtCheckAll
25+
- run: sbt -v +test
26+
- run: sbt -v ci-release
27+
env:
28+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
29+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
30+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
31+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
32+
- name: clean up
33+
run: |
34+
rm -rf "$HOME/.ivy2/local" || true
35+
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
36+
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
37+
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
38+
find $HOME/.sbt -name "*.lock" -delete || true

0 commit comments

Comments
 (0)