Chore: Update Workflow #58
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: prerelease | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Set Timestamp | ||
id: set_timestamp | ||
run: echo "TIMESTAMP=$(TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | ||
- name: Run build.sh | ||
run: sh build.sh | ||
- name: Delete current prerelease assets | ||
uses: andreaswilli/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: Prerelease-Alpha | ||
deleteOnlyFromDrafts: false | ||
- name: Tag Repo | ||
uses: richardsimko/update-tag@v1 | ||
with: | ||
tag_name: Prerelease-Alpha | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload Prerelease | ||
uses: softprops/action-gh-release@v1 | ||
if: success() | ||
with: | ||
tag_name: Prerelease-Alpha | ||
files: Surfing_v*.zip | ||
prerelease: true | ||
body: | | ||
Synchronize the latest code updates of branches and keep only the latest version | ||
Release Timestamp: ${{ env.TIMESTAMP }} |