mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-24 06:02:51 +03:00
ci: use samver
This commit is contained in:
parent
9ff7dbffb7
commit
e2c6e4f9fc
32
.github/workflows/nightly-build.yml
vendored
32
.github/workflows/nightly-build.yml
vendored
@ -22,18 +22,30 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: internal
|
BUILD_TYPE: internal
|
||||||
RELEASE_VERSION: ${{ github.ref_name }}-${{ github.sha }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
set-build-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: production
|
||||||
|
outputs:
|
||||||
|
version: 0.0.0-${{ steps.version.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: toeverything/set-build-version@latest
|
||||||
|
- id: version
|
||||||
|
run: echo ::set-output name=version::${{ env.BUILD_VERSION }}
|
||||||
|
|
||||||
before-make:
|
before-make:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: production
|
environment: production
|
||||||
|
needs:
|
||||||
|
- set-build-version
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
- name: Replace Version
|
- name: Replace Version
|
||||||
run: ./scripts/set-version.sh ${{ env.RELEASE_VERSION }}
|
run: ./scripts/set-version.sh ${{ needs.set-build-version.outputs.version }}
|
||||||
- name: generate-assets
|
- name: generate-assets
|
||||||
working-directory: apps/electron
|
working-directory: apps/electron
|
||||||
run: yarn generate-assets
|
run: yarn generate-assets
|
||||||
@ -83,7 +95,9 @@ jobs:
|
|||||||
- { os: ubuntu-latest, platform: linux, arch: x64 }
|
- { os: ubuntu-latest, platform: linux, arch: x64 }
|
||||||
- { os: windows-latest, platform: windows, arch: x64 }
|
- { os: windows-latest, platform: windows, arch: x64 }
|
||||||
runs-on: ${{ matrix.spec.os }}
|
runs-on: ${{ matrix.spec.os }}
|
||||||
needs: before-make
|
needs:
|
||||||
|
- before-make
|
||||||
|
- set-build-version
|
||||||
env:
|
env:
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
@ -94,7 +108,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
- name: Replace Version
|
- name: Replace Version
|
||||||
run: ./scripts/set-version.sh ${{ env.RELEASE_VERSION }}
|
run: ./scripts/set-version.sh ${{ needs.set-build-version.outputs.version }}
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: before-make-web-static
|
name: before-make-web-static
|
||||||
@ -143,7 +157,9 @@ jobs:
|
|||||||
path: builds
|
path: builds
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: make-distribution
|
needs:
|
||||||
|
- make-distribution
|
||||||
|
- set-build-version
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -180,15 +196,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
node generate-yml.js
|
node generate-yml.js
|
||||||
env:
|
env:
|
||||||
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
|
RELEASE_VERSION: ${{ needs.set-build-version.outputs.version }}
|
||||||
- name: Create Release Draft
|
- name: Create Release Draft
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
with:
|
with:
|
||||||
repository: 'toeverything/AFFiNE-Releases'
|
repository: 'toeverything/AFFiNE-Releases'
|
||||||
name: ${{ env.RELEASE_VERSION }}
|
name: ${{ needs.set-build-version.outputs.version }}
|
||||||
tag_name: ${{ env.RELEASE_VERSION }}
|
tag_name: ${{ needs.set-build-version.outputs.version }}
|
||||||
prerelease: true
|
prerelease: true
|
||||||
files: |
|
files: |
|
||||||
./VERSION
|
./VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user