77jobs :
88 test :
99 name : Test
10- runs-on : ubuntu-20.04
11- container :
12- # Source: https://github.com/day8/dockerfiles-for-dev-ci-images
13- image : ghcr.io/day8/chrome-56:2
14- credentials :
15- username : ${{ github.actor }}
16- password : ${{ secrets.GITHUB_TOKEN }}
10+ runs-on : ubuntu-22.04
11+
1712 steps :
18- - uses : actions/checkout@v1
19- - name : Maven cache
20- id : maven-cache
21- uses : actions/cache@v1
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-tags : true
16+
17+ - name : Setup java
18+ uses : actions/setup-java@v3
2219 with :
23- path : /root/.m2/repository
24- key : ${{ runner.os }}-maven-${{ hashFiles('**/project.clj', '.github/workflows/**') }}
25- restore-keys : |
26- ${{ runner.os }}-maven-
27- - name : npm cache
28- uses : actions/cache@v1
20+ distribution : ' temurin'
21+ java-version : ' 21'
22+
23+ - name : Install clojure tools
24+ uses :
DeLaGuardo/[email protected] 2925 with :
30- path : ~/.npm
31- key : ${{ runner.os }}-npm-${{ hashFiles('project.clj') }}-${{ hashFiles('**/deps.cljs') }}
32- restore-keys : |
33- ${{ runner.os }}-npm-
34- - name : shadow-cljs compiler cache
35- uses : actions/cache@v1
26+ cli : ' latest'
27+ bb : ' latest'
28+
29+ - name : Cache clojure dependencies
30+ uses : actions/cache@v3
3631 with :
37- path : .shadow-cljs
38- key : ${{ runner.os }}-shadow-cljs-${{ github.sha }}
39- restore-keys : |
40- ${{ runner.os }}-shadow-cljs-
41- - if : steps.maven-cache.outputs.cache-hit != 'true'
42- run : |
43- lein ci
44- lein prod-once
45- - if : steps.maven-cache.outputs.cache-hit == 'true'
46- run : |
47- lein -o ci
48- lein -o prod-once
32+ path : |
33+ ~/.m2/repository
34+ ~/.gitlibs
35+ ~/.deps.clj
36+ ~/.npm
37+ .shadow-cljs
38+ key : cljdeps-${{ hashFiles('deps.edn') }}-${{ hashFiles ('package.json') }}-${{ hashFiles ('package-lock.json') }}
39+ restore-keys : cljdeps-
40+
41+ - name : Fix git dubious directory ownership error
42+ run : git config --global --add safe.directory /__w/re-com/re-com
43+
44+ - run : lein prod-once
45+
4946 - name : Slack notification
5047 uses :
homoluctus/[email protected] 5148 if : failure() || cancelled()
@@ -56,68 +53,72 @@ jobs:
5653 url : ${{ secrets.SLACK_WEBHOOK }}
5754 commit : true
5855 token : ${{ secrets.GITHUB_TOKEN }}
56+
5957 release :
6058 name : Release
6159 needs : test
62- runs-on : ubuntu-20.04
63- container :
64- # Source: https://github.com/day8/dockerfiles-for-dev-ci-images
65- image : ghcr.io/day8/chrome-56:2
66- credentials :
67- username : ${{ github.actor }}
68- password : ${{ secrets.GITHUB_TOKEN }}
60+ runs-on : ubuntu-22.04
61+
6962 env :
7063 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
7164 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7265 CLOJARS_USERNAME : ${{ secrets.CLOJARS_USERNAME }}
7366 CLOJARS_TOKEN : ${{ secrets.CLOJARS_TOKEN }}
67+
7468 steps :
75- - uses : actions/checkout@v1
76- - name : Maven cache
77- id : maven-cache
78- uses : actions/cache@v1
69+ - uses : actions/checkout@v4
7970 with :
80- path : /root/.m2/repository
81- key : ${{ runner.os }}-maven-${{ hashFiles('**/project.clj', '.github/workflows/**') }}
82- restore-keys : |
83- ${{ runner.os }}-maven-
84- - name : Run lein release
85- if : steps.maven-cache.outputs.cache-hit != 'true'
86- env :
87- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
88- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
89- CLOJARS_USERNAME : ${{ secrets.CLOJARS_USERNAME }}
90- CLOJARS_TOKEN : ${{ secrets.CLOJARS_TOKEN }}
91- GITHUB_USERNAME : ${{ github.actor }}
92- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
93- run : |
94- lein release
95- - name : Run lein -o release
96- if : steps.maven-cache.outputs.cache-hit == 'true'
71+ fetch-tags : true
72+
73+ - name : Setup java
74+ uses : actions/setup-java@v3
75+ with :
76+ distribution : ' temurin'
77+ java-version : ' 21'
78+
79+ - name : Install clojure tools
80+ uses :
DeLaGuardo/[email protected] 81+ with :
82+ cli : ' latest'
83+ bb : ' latest'
84+
85+ - name : Cache clojure dependencies
86+ uses : actions/cache@v3
87+ with :
88+ path : |
89+ ~/.m2/repository
90+ ~/.gitlibs
91+ ~/.deps.clj
92+ ~/.npm
93+ .shadow-cljs
94+ key : cljdeps-${{ hashFiles('deps.edn') }}-${{ hashFiles ('package.json') }}-${{ hashFiles ('package-lock.json') }}
95+ restore-keys : cljdeps-
96+
97+ - run : lein release
9798 env :
9899 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
99100 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
100101 CLOJARS_USERNAME : ${{ secrets.CLOJARS_USERNAME }}
101102 CLOJARS_TOKEN : ${{ secrets.CLOJARS_TOKEN }}
102103 GITHUB_USERNAME : ${{ github.actor }}
103104 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104- run : |
105- lein -o release
105+
106106 # This creates a 'GitHub Release' from the tag and includes link to CHANGELOG.md at the current
107107 # git ref. We do not use draft or prerelease features as we always want
108108 # the latest release to show in the right hand column of the project page regardless
109109 # of if it is a stable release.
110- - name : Create GitHub Release
111- uses : actions/create-release@v1
112- env :
113- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
114- with :
115- tag_name : ${{ github.ref }}
116- release_name : ${{ github.ref }}
117- body : |
118- [Changelog](https://github.com/day8/re-com/blob/master/CHANGELOG.md)
119- draft : false
120- prerelease : false
110+ # - name: Create GitHub Release
111+ # uses: actions/create-release@v1
112+ # env:
113+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+ # with:
115+ # tag_name: ${{ github.ref }}
116+ # release_name: ${{ github.ref }}
117+ # body: |
118+ # [Changelog](https://github.com/day8/re-com/blob/master/CHANGELOG.md)
119+ # draft: false
120+ # prerelease: false
121+
121122 - name : Slack notification
122123 uses :
homoluctus/[email protected] 123124 if : always()
0 commit comments