-
Notifications
You must be signed in to change notification settings - Fork 24
113 lines (97 loc) · 3.13 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# This is a copy-and-past version of ci.yml but additionally creating a release
name: Release Artifacts
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build-jar:
name: Build Effekt compiler and run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up NodeJS
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install MLton
run: |
curl -L https://github.com/MLton/mlton/releases/download/on-20210117-release/mlton-20210117-1.amd64-linux-glibc2.31.tgz --output mlton.tgz
tar -xzf mlton.tgz
mv mlton-20210117-1.amd64-linux-glibc2.31 $GITHUB_WORKSPACE/mlton
chmod +x $GITHUB_WORKSPACE/mlton/bin/mlton
echo "Trying to call directly"
$GITHUB_WORKSPACE/mlton/bin/mlton
echo "Adding mlton to path"
echo "$GITHUB_WORKSPACE/mlton/bin" >> $GITHUB_PATH
- name: Install Chez Scheme
run: sudo apt-get install chezscheme
- name: Run tests and assemble jar file
run: sbt clean deploy
- id: npmpackage
name: Generate npm package
run: mv $(npm pack) effekt.tgz
- name: Upload Effekt binary
uses: actions/upload-artifact@v1
with:
name: effekt
path: bin/effekt
- name: Upload the npm package
uses: actions/upload-artifact@v1
with:
name: effekt-npm-package
path: effekt.tgz
release:
name: Create Release
runs-on: ubuntu-latest
needs: [build-jar]
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Download JAR artifact
uses: actions/download-artifact@v1
with:
name: effekt
path: distribution/
- name: Download npm package
uses: actions/download-artifact@v1
with:
name: effekt-npm-package
path: distribution/
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Prerelease ${{ github.ref }}
tag_name: ${{ github.ref }}
body: Automatic release for ${{ github.ref }}
draft: false
prerelease: true
- name: Upload jar file
id: upload_jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./distribution/effekt
asset_name: effekt.jar
asset_content_type: application/java-archive
- name: Upload npm package
id: upload_npm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./distribution/effekt.tgz
asset_name: effekt.tgz
asset_content_type: application/gzip