-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (63 loc) · 2.03 KB
/
Copy pathpublish.yml
File metadata and controls
69 lines (63 loc) · 2.03 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
# base - .github/workflows/publish.yml - beg
# Publishing packages to npm and GitHub Packages
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-npm-and-github-packages
# https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow
name: publish
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish_github:
name: Publish Package to GitHub
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
# scope: "@octocat"
# Publish to GitHub Packages
- run: sh jslint_ci.sh shCiPublishNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_REGISTRY: github
publish_npmjs:
name: Publish Package to npmjs
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for OIDC
packages: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
# Publish to npmjs Packages
- run: sh jslint_ci.sh shCiPublishNpm
# base - .github/workflows/publish.yml - end
publish_pypi:
name: Publish Package to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/sqlmath/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# retrieve your distributions here
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: sh jslint_ci.sh shCiPublishPypi
# publish to pypi
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1