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
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