From 35065d081fa6c4cd1bc9e6596275215f2edb54f0 Mon Sep 17 00:00:00 2001 From: Teng Zhang Date: Mon, 21 Mar 2022 13:18:19 +0800 Subject: [PATCH] Add github-action to build and release swot.txt --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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 0000000000..90e7e1a375 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Compile and run Kotlin + run: | + kotlinc src/swot -include-runtime -d swot.jar + java -jar swot.jar + + - name: Move the 'latest' tag to the head commit + run: | + git tag latest + git push origin latest -f + + - name: Release swot.txt + uses: softprops/action-gh-release@v1 + with: + files: out/artifacts/swot.txt + tag_name: latest + body: ${{ github.event.head_commit.message }}