From fd1af8caa72fc16c9c1783f66fec94ded7deb80c Mon Sep 17 00:00:00 2001 From: Nanoskript <96655713+nanoskript@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:52:33 +1000 Subject: [PATCH] ci: add GitHub actions workflow --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 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..aa90f3c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout Git repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Generate + run: python3 compile.py + + - name: Copy artifacts to public folder + run: cp onomatopoeia.json public/onomatopoeia.json + + - name: Package web sources + run: tar -czvf web-public.tar.gz public + + - name: Release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: false + title: "Latest build" + files: | + onomatopoeia.json + web-public.tar.gz \ No newline at end of file