feat: dotnet publish re-entrant #1650
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: 'Build / Test / Artifacts' | |
on: | |
push: | |
branches: | |
- master | |
- release/** | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['20'] | |
name: Node ${{ matrix.node }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '${{ matrix.node }}' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock') }} | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Test | |
run: yarn test | |
artifacts: | |
name: Artifacts Upload | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: package.json | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock') }} | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build --define:process.env.CRAFT_BUILD_SHA='"'${{ github.sha }}'"' | |
- name: NPM Pack | |
run: npm pack | |
- name: Docs | |
run: cd docs && zip -r ../gh-pages _site/ | |
- name: Archive Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.sha }} | |
path: | | |
${{ github.workspace }}/gh-pages.zip | |
${{ github.workspace }}/*.tgz | |
${{ github.workspace }}/dist/craft |