feat: 新增视频壁纸轮播 #1160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NodeJs with Release | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Load environment | |
uses: GuillaumeFalourd/convert-json-to-env@v1 | |
with: | |
json_file: ./config/module.config.json | |
- name: 生成版本代码 | |
run: | | |
npm install | |
npm run package-ext:sothx | |
- name: 写入所有模块文件到发布目录 | |
run: | | |
mkdir -p "$GITHUB_WORKSPACE"/GithubRelease | |
cd "$GITHUB_WORKSPACE" | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/fold-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-magicWindow-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-general-tiramisu-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-general-upsideDownCake-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-hyperos-based-on-tiramisu-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-miui-based-on-tiramisu-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/pad-hyperos1-based-on-upsideDownCake-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
mv $GITHUB_WORKSPACE/release/$VERSION/ext/pad-ext-$VERSION.zip "$GITHUB_WORKSPACE"/GithubRelease | |
- name: 上传到Github Release | |
uses: ncipollo/release-action@main | |
with: | |
artifacts: ${{ github.workspace }}/GithubRelease/* | |
name: "${{ env.VERSION }}" | |
tag: "${{ env.VERSION }}" | |
bodyFile: "${{ github.workspace }}/docs/changelog.md" | |
allowUpdates: false | |
artifactErrorsFailBuild: true | |
makeLatest: true | |
skipIfReleaseExists: true | |
- name: 更新版本链接 | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "sothx" | |
git add ./docs/release/* | |
if git commit -m "Release $VERSION"; then | |
git push | |
fi | |