-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (108 loc) · 3.47 KB
/
release.yaml
File metadata and controls
119 lines (108 loc) · 3.47 KB
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
114
115
116
117
118
119
name: release
on:
release:
types: [released]
workflow_dispatch:
jobs:
brew-dispatcher:
name: Release on homebrew-prql
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.HOMEBREW_PRQL_TOKEN}}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'prql',
repo: 'homebrew-prql',
workflow_id: 'update.yml',
ref: 'main',
inputs: {
version: '${{ github.ref }}',
URL: 'https://github.com/prql/prql/archive/${{ github.ref }}.tar.gz'
}
})
build-python-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
- uses: ./.github/actions/build-wheel
publish-prql-python:
runs-on: ubuntu-latest
needs: [build-python-wheels]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *
publish-prql-js:
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
- name: Make dist folder
run: mkdir dist
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.3.0
with:
version: "latest"
- name: Run wasm-pack for node
run: wasm-pack build --target nodejs --release --out-dir dist/node
working-directory: prql-js/
- name: Run wasm-pack for web
run: wasm-pack build --target no-modules --release --out-dir dist/web
working-directory: prql-js/
- name: Run wasm-pack for bundler
run: wasm-pack build --target bundler --release --out-dir dist/bundler
working-directory: prql-js/
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: Run prql tests for node
run: npm i && npm run test
working-directory: prql-js/tests/
- name: Publish package on npm
run: npm publish
working-directory: prql-js/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Possibly we roll this into a more complete approach, possibly with cargo-release.
publish-prql-compiler:
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
- uses: actions-rs/cargo@v1
with:
command: publish
args: -p prql-compiler
# Requires another pass: https://github.com/prql/prql/issues/850
# publish-prql-java:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Install Java and Maven
# uses: actions/setup-java@v3
# with:
# java-version: 8
# - name: Release Maven package
# uses: samuelmeuli/action-maven-publish@v1
# with:
# gpg_private_key: ${{ secrets.gpg_private_key }}
# gpg_passphrase: ${{ secrets.gpg_passphrase }}
# nexus_username: ${{ secrets.nexus_username }}
# nexus_password: ${{ secrets.nexus_password }}
# directory: prql-java/java/