From 5174aec7a8b4bde3826cf5219b7e268a64426e93 Mon Sep 17 00:00:00 2001 From: jdkato Date: Wed, 20 Sep 2023 16:48:15 -0700 Subject: [PATCH] Add release workflow --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3796ab0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: push + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - run: | + cd pkg + for p in */; do + cd "$p" + zip -r "${p%/}.zip" "${p%/}" -x "*.DS_Store" && mv "${p%/}.zip" ../ + cd .. + done + cd .. + + - name: Upload style to release + uses: svenstaro/upload-release-action@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file_glob: true + file: pkg/*.zip \ No newline at end of file diff --git a/.gitignore b/.gitignore index 894a44c..438a788 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ venv.bak/ # mypy .mypy_cache/ + +*.zip