如何使用 github actions 添加存档文件以进行发布?
我正在尝试添加一个工件文件,并在通过在 github 操作上推送标签来触发时将 DEPLOY.md 文件从子目录添加到发行版。 这是我的工作流程代码
---
name: Module Three Task Three
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clone
run: |
git clone https://github.com/mittsahl/validation
- name: Hugo
run: |
brew install hugo
- name: Create package
run: |
cd validation/module3_task3
make build
make package
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
path: |
validation/module3_task3/awesome-website.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
DEPLOY.md
awesome-website.zip
zip 文件 Awesome-website.zip 和 DEPLOY.md 位于目录 valid/module3_task3/ 中。 我可以通过推送标签和 Awesome-website.zip 存档来创建发行版,但它只是为我提供了发行版中整个存储库的 zip 文件。我想要的只是 DEPLOY.md 和工件或 Awesome-website.zip 文件。当我查看 github 操作时,它给了我一条消息,
Run softprops/action-gh-release@v1
I am trying to add an artifact file, and DEPLOY.md file from a sub directory to a release when triggered by pushing tag on github actions.
Here is my code for the work flow
---
name: Module Three Task Three
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clone
run: |
git clone https://github.com/mittsahl/validation
- name: Hugo
run: |
brew install hugo
- name: Create package
run: |
cd validation/module3_task3
make build
make package
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
path: |
validation/module3_task3/awesome-website.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
DEPLOY.md
awesome-website.zip
The zip file awesome-website.zip and DEPLOY.md are in the directory validation/module3_task3/.
I can create the release on the push of a tag and the archive of awesome-website.zip, but it just gives me a zip file of the entire repo in the release. What I want is only the DEPLOY.md and artifact or awesome-website.zip file. When I look in the github actions it gives me the message
Run softprops/action-gh-release@v1
???? Pattern 'DEPLOY.md' does not match any files.
???? Pattern 'awesome-website.zip' does not match any files.
???????? Creating new GitHub release for tag 1.0.0...
???? Release ready at https://github.com/mittsahl/validation/releases/tag/1.0.0
???? DEPLOY.md,awesome-website.zip not include valid file.
I have tried giving it the full path to those files each without any success. Any input would be greatly appreciated. Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论