Skip to content

Commit f33dd3e

Browse files
committed
Add skeleton for publish workflow with inputs
1 parent 6f303b0 commit f33dd3e

1 file changed

Lines changed: 98 additions & 0 deletions

File tree

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2022 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# Workflow name:
20+
name: standalone_publish
21+
22+
# Workflow triggers:
23+
on:
24+
# Allow the workflow to be manually run:
25+
workflow_dispatch:
26+
inputs:
27+
skip:
28+
type: choice
29+
description: Whether to skip individual or toplevel package publishing
30+
options:
31+
-
32+
- --skip-toplevel
33+
- --skip-individual
34+
packages:
35+
description: Space-separated list of packages to publish
36+
skip-upload:
37+
type: boolean
38+
description: Boolean flag indicating whether to skip uploading the packages (dry run)
39+
patch:
40+
type: boolean
41+
description: Boolean flag indicating whether to create a patch release for the packages
42+
43+
# Workflow concurrency group:
44+
concurrency:
45+
46+
# Specify a group name:
47+
group: ${{ github.workflow }}
48+
49+
# Specify whether to cancel any currently running workflow in the same concurrency group:
50+
cancel-in-progress: false
51+
52+
# Workflow jobs:
53+
jobs:
54+
55+
# Define a job for publishing standalone packages...
56+
publish:
57+
58+
# Define a display name:
59+
name: 'Publish'
60+
61+
# Define the type of virtual host machine:
62+
runs-on: ubuntu-latest
63+
64+
# Define the sequence of job steps...
65+
steps:
66+
67+
# Checkout the repository:
68+
- name: 'Checkout repository'
69+
uses: actions/checkout@v2
70+
with:
71+
# Specify whether to remove untracked files before checking out the repository:
72+
clean: false
73+
74+
# Limit clone depth to the most recent commit:
75+
fetch-depth: 1
76+
77+
# Specify whether to download Git-LFS files:
78+
lfs: false
79+
timeout-minutes: 10
80+
81+
# Install Node.js:
82+
- name: 'Install Node.js'
83+
uses: actions/setup-node@v2
84+
with:
85+
node-version: '16' # 'lts/*'
86+
timeout-minutes: 5
87+
88+
# Install dependencies (accounting for possible network failures, etc, when installing node module dependencies):
89+
- name: 'Install dependencies'
90+
run: |
91+
make install-node-modules || make install-node-modules || make install-node-modules
92+
timeout-minutes: 15
93+
94+
# Publish standalone packages:
95+
- name: 'Publish packages'
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
98+
run: |

0 commit comments

Comments
 (0)