更新自动打包文件 #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Package for Tag | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get project name | |
id: vars | |
run: echo "::set-output name=project_name::$(basename $(git rev-parse --show-toplevel))" | |
- name: Package files as ZIP | |
run: | | |
mkdir -p package | |
zip -r "${{ steps.vars.outputs.project_name }}-${{ github.ref_name }}.zip" . package/ -x ".github/*" -x ".gitignore" -x "pkgmeta.yaml" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifact | |
path: "${{ steps.vars.outputs.project_name }}-${{ github.ref_name }}.zip" |