forked from facebookresearch/fairseq2
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.45 KB
/
_publish_pypi.yaml
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
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
on:
workflow_call:
inputs:
os:
type: string
required: true
torch:
type: string
required: true
py:
type: string
required: true
variant:
type: string
default: 'cpu'
arch:
type: string
default: 'x86_64'
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
# Needed to interact with GitHub's OIDC Token endpoint.
id-token: write
steps:
- name: Download wheels from staging
uses: actions/download-artifact@v3
with:
name: pypi-pt${{ inputs.torch }}-py${{ inputs.py }}-${{ inputs.os }}_${{ inputs.arch }}-${{ inputs.variant }}-nosan
path: artifacts/
- name: Publish fairseq2n
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifacts/fairseq2n/python/build/wheelhouse
- name: Publish fairseq2
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifacts/build/wheelhouse
# Multiple build variants will attempt to publish the same fairseq2
# package. Ignore all but the first one.
skip-existing: true