7
7
jobs :
8
8
test :
9
9
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
+
17
12
steps :
18
13
- uses : actions/checkout@v1
19
- - name : Maven cache
20
- id : maven-cache
21
- uses : actions/cache@v1
14
+
15
+ - name : Setup java
16
+ uses : actions/setup-java@v3
22
17
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
18
+ distribution : ' temurin'
19
+ java-version : ' 21'
20
+
21
+ - name : Install clojure tools
22
+ uses :
DeLaGuardo/[email protected]
29
23
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
24
+ cli : ' latest'
25
+ bb : ' latest'
26
+
27
+ - name : Cache clojure dependencies
28
+ uses : actions/cache@v3
36
29
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
30
+ path : |
31
+ ~/.m2/repository
32
+ ~/.gitlibs
33
+ ~/.deps.clj
34
+ ~/.npm
35
+ .shadow-cljs
36
+ key : cljdeps-${{ hashFiles('deps.edn') }}-${{ hashFiles ('package.json') }}-${{ hashFiles ('package-lock.json') }}
37
+ restore-keys : cljdeps-
38
+
39
+ - name : Fix git dubious directory ownership error
40
+ run : git config --global --add safe.directory /__w/re-com/re-com
41
+
42
+ - run : lein prod-once
43
+
49
44
- name : Slack notification
50
45
uses :
homoluctus/[email protected]
51
46
if : failure() || cancelled()
@@ -56,68 +51,70 @@ jobs:
56
51
url : ${{ secrets.SLACK_WEBHOOK }}
57
52
commit : true
58
53
token : ${{ secrets.GITHUB_TOKEN }}
54
+
59
55
release :
60
56
name : Release
61
57
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 }}
58
+ runs-on : ubuntu-22.04
59
+
69
60
env :
70
61
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
71
62
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
72
63
CLOJARS_USERNAME : ${{ secrets.CLOJARS_USERNAME }}
73
64
CLOJARS_TOKEN : ${{ secrets.CLOJARS_TOKEN }}
65
+
74
66
steps :
75
67
- uses : actions/checkout@v1
76
- - name : Maven cache
77
- id : maven-cache
78
- uses : actions/cache@v1
68
+
69
+ - name : Setup java
70
+ uses : actions/setup-java@v3
79
71
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'
72
+ distribution : ' temurin'
73
+ java-version : ' 21'
74
+
75
+ - name : Install clojure tools
76
+ uses :
DeLaGuardo/[email protected]
77
+ with :
78
+ cli : ' latest'
79
+ bb : ' latest'
80
+
81
+ - name : Cache clojure dependencies
82
+ uses : actions/cache@v3
83
+ with :
84
+ path : |
85
+ ~/.m2/repository
86
+ ~/.gitlibs
87
+ ~/.deps.clj
88
+ ~/.npm
89
+ .shadow-cljs
90
+ key : cljdeps-${{ hashFiles('deps.edn') }}-${{ hashFiles ('package.json') }}-${{ hashFiles ('package-lock.json') }}
91
+ restore-keys : cljdeps-
92
+
93
+ - run : lein release
97
94
env :
98
95
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
99
96
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
100
97
CLOJARS_USERNAME : ${{ secrets.CLOJARS_USERNAME }}
101
98
CLOJARS_TOKEN : ${{ secrets.CLOJARS_TOKEN }}
102
99
GITHUB_USERNAME : ${{ github.actor }}
103
100
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104
- run : |
105
- lein -o release
101
+
106
102
# This creates a 'GitHub Release' from the tag and includes link to CHANGELOG.md at the current
107
103
# git ref. We do not use draft or prerelease features as we always want
108
104
# the latest release to show in the right hand column of the project page regardless
109
105
# 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
106
+ # - name: Create GitHub Release
107
+ # uses: actions/create-release@v1
108
+ # env:
109
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110
+ # with:
111
+ # tag_name: ${{ github.ref }}
112
+ # release_name: ${{ github.ref }}
113
+ # body: |
114
+ # [Changelog](https://github.com/day8/re-com/blob/master/CHANGELOG.md)
115
+ # draft: false
116
+ # prerelease: false
117
+
121
118
- name : Slack notification
122
119
uses :
homoluctus/[email protected]
123
120
if : always()
0 commit comments