-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (69 loc) · 2.53 KB
/
npm-package.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
name: NPM package
on:
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Sync pip requirements
run: curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/.github/workflows/requirements-runner.txt
working-directory: .github/workflows
- name: Setup Python and pip
uses: actions/setup-python@v4
with:
python-version: 3.11.x
cache: pip
cache-dependency-path: .github/workflows/requirements-runner.txt
- name: Install Python requirements and Create default Conan profile
run: pip install -r .github/workflows/requirements-runner.txt
- name: Install Linux system requirements for building
run: |
mkdir runner_scripts
cd runner_scripts
curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/runner_scripts/ubuntu_setup.sh
chmod +x ubuntu_setup.sh
sudo ./ubuntu_setup.sh
- name: Setup pipeline caches
run: |
mkdir -p /home/runner/.conan/downloads
mkdir -p /home/runner/.conan/data
- name: Create default Conan profile
run: conan profile new default --detect
- name: Get Conan configuration
run: |
conan config install https://github.com/Ultimaker/conan-config.git
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
- name: Cache Conan packages
uses: actions/cache@v3
with:
path: /home/runner/.conan/data
key: ${{ runner.os }}-conan-data-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-conan-data-
- name: Cache Conan downloads
uses: actions/cache@v3
with:
path: /home/runner/.conan/downloads
key: ${{ runner.os }}-conan-downloads-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-conan-downloads-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ./DulcificumJS/.nvmrc
registry-url: 'https://npm.pkg.github.com'
scope: '@ultimaker'
- name: NPM install and publish
run: |
npm run install_dulcificum
npm ci
npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: DulcificumJS