From 34407a4646f77cb5ae73e3745befad7280c652fd Mon Sep 17 00:00:00 2001 From: liyp Date: Sun, 30 Apr 2023 16:37:23 +0800 Subject: [PATCH] test action --- .github/workflows/build.yaml | 58 +++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cca17f6..d49772d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,19 +1,41 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions -on: [push] -jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "This job's status is ${{ gitea.status }}." +name: Install pnpm and build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@v3 + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies and build + run: | + pnpm i + pnpm build + pwd + tar czf yacd.tar.gz ./public + # ls -la + + #- uses: actions/upload-artifact@v3 + #with: + #path: ./yacd.tar.gz + #name: yacd-meta + #if-no-files-found: warn + - run: ls -la + #- uses: actions/release-action@v1 + #with: + #allowUpdates: true + #tag: "v*" + #artifacts: "./yacd.tar.gz" + #token: ${{ secrets.RELEASE_KEY }} + - name: Release + uses: https://github.com/softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: yacd.tar.gz