-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 1.61 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Deploy packages
on:
push:
branches:
- master
workflow_dispatch:
jobs:
check-version-bumps:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.versions-bumped.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
- name: Check if versions bumped
id: versions-bumped
uses: tj-actions/[email protected]
with:
files: |
cljest/build.edn
jest-preset-cljest/package.json
deploy-cljest:
needs: check-version-bumps
if: needs.check-version-bumps.outputs.changed == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: cljest
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: Setup Clojure
uses: DeLaGuardo/[email protected]
with:
cli: 1.11.1.1224
- name: Deploy cljest
run: make publish-to-clojars
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
deploy-jest-preset-cljest:
needs: check-version-bumps
if: needs.check-version-bumps.outputs.changed == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: jest-preset-cljest
steps:
- uses: actions/checkout@v3
- name: Deploy jest-preset-cljest
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}