mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-24 11:01:17 -08:00
ci: add nightly info to web deploys
This commit is contained in:
1 parent
55f7adf4e8
commit
fc291d37ee
3 files changed
+32
-6
No files matched your search
@@ -52,6 +52,13 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Resolve release version
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
TAG="${{ github.event_name == 'workflow_dispatch' && inputs.git_tag || github.ref_name }}"
|
||||
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Prepare OpenTofu deployment
|
||||
uses: ./.github/actions/prepare-tofu
|
||||
with:
|
||||
@@ -59,7 +66,7 @@ jobs:
|
||||
env:
|
||||
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
|
||||
VITE_SENTRY_ENVIRONMENT: production
|
||||
VITE_APP_VERSION: ${{ github.ref_name }}
|
||||
VITE_APP_VERSION: ${{ steps.version.outputs.version }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
@@ -85,6 +92,13 @@ jobs:
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.git_tag || '' }}
|
||||
|
||||
- name: Resolve release version
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
TAG="${{ github.event_name == 'workflow_dispatch' && inputs.git_tag || github.ref_name }}"
|
||||
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Prepare OpenTofu deployment
|
||||
uses: ./.github/actions/prepare-tofu
|
||||
with:
|
||||
@@ -92,7 +106,7 @@ jobs:
|
||||
env:
|
||||
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
|
||||
VITE_SENTRY_ENVIRONMENT: production
|
||||
VITE_APP_VERSION: ${{ github.ref_name }}
|
||||
VITE_APP_VERSION: ${{ steps.version.outputs.version }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
|
||||
@@ -41,14 +41,21 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Compute nightly version
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION="$(node .github/scripts/nightly-version.mjs "${{ github.run_number }}" "${{ github.run_attempt }}")"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Prepare OpenTofu deployment
|
||||
uses: ./.github/actions/prepare-tofu
|
||||
with:
|
||||
is_release_tag: 'false'
|
||||
is_release_tag: 'true'
|
||||
env:
|
||||
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
|
||||
VITE_SENTRY_ENVIRONMENT: development
|
||||
VITE_APP_VERSION: ${{ github.ref_name }}
|
||||
VITE_APP_VERSION: ${{ steps.version.outputs.version }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
|
||||
@@ -49,13 +49,17 @@ jobs:
|
||||
id: release_tag
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ inputs.git_tag }}" ]]; then
|
||||
TAG="${{ inputs.git_tag }}"
|
||||
else
|
||||
TAG="${GITHUB_REF#refs/tags/}"
|
||||
fi
|
||||
if [[ "${TAG}" == v* ]]; then
|
||||
echo "value=${TAG}" >> "$GITHUB_OUTPUT"
|
||||
echo "value=${TAG#v}" >> "$GITHUB_OUTPUT"
|
||||
echo "is_release=true" >> "$GITHUB_OUTPUT"
|
||||
elif [[ "${GITHUB_REF}" == "refs/heads/dev" ]]; then
|
||||
NIGHTLY_VERSION="$(node .github/scripts/nightly-version.mjs "${{ github.run_number }}" "${{ github.run_attempt }}")"
|
||||
echo "value=${NIGHTLY_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "is_release=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "value=" >> "$GITHUB_OUTPUT"
|
||||
@@ -90,6 +94,7 @@ jobs:
|
||||
- name: Build site
|
||||
env:
|
||||
VITE_BUILD_HASH: ${{ steps.vars.outputs.short_sha }}
|
||||
VITE_APP_VERSION: ${{ steps.release_tag.outputs.value }}
|
||||
VITE_IS_RELEASE_TAG: ${{ steps.release_tag.outputs.is_release }}
|
||||
run: |
|
||||
NODE_OPTIONS=--max_old_space_size=4096 pnpm run build
|
||||
|
||||
Reference in new issue
Block a user