-
Notifications
You must be signed in to change notification settings - Fork 1.2k
55 lines (54 loc) · 1.91 KB
/
publish_artifacts.yaml
File metadata and controls
55 lines (54 loc) · 1.91 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
name: Publish release artifacts
on:
release:
types: [released, prereleased]
jobs:
build-and-publish-pypi:
if: github.repository_owner == 'galaxyproject'
name: Build and Publish to PyPI
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install script dependencies
run: pip install galaxy-release-util
- name: Build and publish to PyPI
run: |
galaxy-release-util build-and-upload --no-confirm
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ github.event.release.prerelease && secrets.PYPI_TEST_TOKEN || secrets.PYPI_MAIN_TOKEN }}
TWINE_REPOSITORY_URL: ${{ github.event.release.prerelease && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
build-and-publish-npm:
if: github.repository_owner == 'galaxyproject'
name: Build and Publish to NPM
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v5
- name: Read Node.js version
id: node-version
run: echo "version=$(cat client/.node_version)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v6
with:
node-version: ${{ steps.node-version.outputs.version }}
cache: 'yarn'
cache-dependency-path: 'client/yarn.lock'
registry-url: 'https://registry.npmjs.org'
- name: build client
run: yarn && yarn build-production
working-directory: 'client'
- name: publish client
if: "!github.event.release.prerelease"
run: npm publish --provenance --access public
working-directory: 'client'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}