Skip to content

release: v4.5.12

release: v4.5.12 #252

Workflow file for this run

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Release
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache pnpm modules
uses: actions/cache@v3
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/[email protected]
with:
version: 8.x.x
run_install: true
- name: Build project
env:
ASSETPREFIX: ${{ secrets.ASSETPREFIX }}
NEXT_PUBLIC_APIURL: https://innei.ren/api/v2
NEXT_PUBLIC_GATEWAY_URL: https://api.innei.ren
SENTRY: true
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}
run: |
sh standalone-build.sh
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- run: npx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./release.zip
asset_name: release-ubuntu.zip
asset_content_type: application/zip
deploy:
name: Deploy to server
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Exec deploy script with SSH
uses: appleboy/ssh-action@master
with:
command_timeout: 10m
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
script_stop: true
script: |
whoami
cd
source ~/.zshrc
cd mx/kami
git reset --hard
node scripts/fetch-build.mjs
# sh scripts/update-cdn.sh