test action

This commit is contained in:
liyp 2023-04-30 16:37:23 +08:00
parent 11877818c9
commit 34407a4646

View file

@ -1,19 +1,41 @@
name: Gitea Actions Demo name: Install pnpm and build
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on: [push] on: push
jobs:
Explore-Gitea-Actions: jobs:
runs-on: ubuntu-latest build:
steps: runs-on: ubuntu-latest
- 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!" steps:
- run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Checkout the code
- name: Check out repository code uses: actions/checkout@v3
uses: actions/checkout@v3
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." - name: Install pnpm
- run: echo "The workflow is now ready to test your code on the runner." run: npm install -g pnpm
- name: List files in the repository
run: | - name: Install dependencies and build
ls ${{ gitea.workspace }} run: |
- run: echo "This job's status is ${{ gitea.status }}." 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