fix: CI
fix naming
This commit is contained in:
parent
212be5e360
commit
ff10f73645
1 changed files with 14 additions and 2 deletions
|
|
@ -10,6 +10,8 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: oven/bun:1
|
container: oven/bun:1
|
||||||
|
outputs:
|
||||||
|
artifact_name: ${{ steps.meta.outputs.name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install git and node
|
- name: Install git and node
|
||||||
run: apt-get update && apt-get install -y git nodejs
|
run: apt-get update && apt-get install -y git nodejs
|
||||||
|
|
@ -17,6 +19,16 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set artifact name
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||||
|
tag="${GITHUB_REF_NAME#v}"
|
||||||
|
else
|
||||||
|
tag="$(date -u +%Y%m%d)"
|
||||||
|
fi
|
||||||
|
echo "name=portfolio_${tag}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
|
@ -35,7 +47,7 @@ jobs:
|
||||||
- name: Upload dist
|
- name: Upload dist
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: portfolio${{ '_' + steps.meta.outputs.tag }}.zip
|
name: ${{ steps.meta.outputs.name }}.zip
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
|
@ -50,7 +62,7 @@ jobs:
|
||||||
- name: Download dist
|
- name: Download dist
|
||||||
uses: https://code.forgejo.org/forgejo/download-artifact@v4
|
uses: https://code.forgejo.org/forgejo/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: ${{ needs.build.outputs.artifact_name }}.zip
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue