-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.62 KB
/
release.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
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
npm_publish:
runs-on: ubuntu-20.04
strategy:
matrix:
vocab: [
"common-rdf/vocab-common-rdf.yml",
"solid-rdf/vocab-solid.yml",
"inrupt-rdf/Core/vocab-inrupt-core.yml",
"inrupt-rdf/Glossary/vocab-inrupt-glossary.yml",
"inrupt-rdf/Test/vocab-inrupt-test.yml"
]
name: npm release for ${{ matrix.vocab }}
steps:
# Makes the current repository available to the workflow.
- name: Checkout repo
uses: actions/checkout@v4
# Initializes Node and npm to install the Artifact Generator from GitHub
# packages.
- name: Node setup
uses: actions/setup-node@v4
with:
node-version: '16.16.0'
registry-url: https://registry.npmjs.com/
scope: '@inrupt'
# The following action is defined in the current repository.
# It reads the expected Artifact Generator version from the YAML file.
- name: Get generator version (Common)
uses: ./.github/artifact-generator-version/
id: generator-version-common
with:
vocab-config-path: ${{ matrix.vocab }}
# Use the generator to generate and publish the npm package.
# Maven packages are published by the CD script, and do not need to be
# published again on release.
- name: Generation and publication
run: npx @inrupt/artifact-generator@${{steps.generator-version-common.outputs.vocab-generator-version}} generate -l ${{ matrix.vocab }} -p npmPublic --noPrompt
env:
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}