Skip to content

Commit 87cdd05

Browse files
committed
demo
1 parent e88dd9c commit 87cdd05

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/npm-publish-github-packages.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ jobs:
4747
- name: Run a one-line script
4848
run: echo Hello, world!
4949

50+
# 设置环境变量
51+
- name: Print a greeting
52+
env:
53+
MY_VAR: Hi there! My name is
54+
FIRST_NAME: Mona
55+
MIDDLE_NAME: The
56+
LAST_NAME: Octocat
57+
run: |
58+
echo $MY_VAR $FIRST_NAME $MIDDLE_NAME $LAST_NAME.
59+
# 使用条件判断
60+
- if: ${{ env.MY_VAR != '' }}
61+
run: echo 'This step will only run if the secret has a value set.'
5062
# - run: npm ci
5163
# 设定安装工具为 yarn
5264
# - name: Global install Yarn 🔨

0 commit comments

Comments
 (0)