-
-
Notifications
You must be signed in to change notification settings - Fork 81
40 lines (33 loc) · 995 Bytes
/
publish.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
name: Publish to npmjs.com and ghcr.io
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-22.04
environment: release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build and push Docker image
uses: openzim/docker-publish-action@v10
with:
image-name: openzim/mwoffliner
tag-pattern: /^v([0-9.]+)$/
latest-on-tag: true
restrict-to: openzim/mwoffliner
registries: ghcr.io
credentials: |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
repo_description: auto
repo_overview: auto