Updated workflow, env name for bsb plugins and docker scripts #2
Workflow file for this run
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 and Publish (EA) | |
# on: | |
# push: | |
# branches: | |
# - "develop" | |
# jobs: | |
# build_and_publish_ea_nodejs: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node-version: [18.x, 20.x] | |
# #experimental: [false] | |
# #include: | |
# # - node-version: 19.x | |
# # experimental: true | |
# #continue-on-error: ${{ matrix.experimental }} | |
# outputs: | |
# version: ${{ steps.semver.outputs.version }} | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: "npm" | |
# cache-dependency-path: nodejs/package-lock.json | |
# - run: npm i -g typescript ts-node | |
# working-directory: ./nodejs | |
# - run: tsc -v ; ts-node -v | |
# working-directory: ./nodejs | |
# - run: npm ci | |
# working-directory: ./nodejs | |
# - name: semver | |
# id: semver | |
# uses: paulhatch/[email protected] | |
# with: | |
# tag_prefix: "v" | |
# branch: develop | |
# major_pattern: "(MAJOR)" | |
# minor_pattern: "(MINOR)" | |
# format: "${major}.${minor}.${patch}-ea.${increment}" | |
# change_path: "./" | |
# bump_each_commit: true | |
# namespace: "" | |
# - run: rm -f ~/.npmrc ; rm -f ./.npmrc ; echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM2_TOKEN_PUB }}" > ./.npmrc | |
# working-directory: ./nodejs | |
# - run: | | |
# git config user.name "${{ secrets.NPM_NAME }}"; | |
# git config user.email "${{ secrets.NPM_EMAIL }}"; | |
# echo "Hello $(git config --get user.name)"; | |
# - name: output version | |
# run: | | |
# echo "Setting version too: ${{ steps.semver.outputs.version }}"; | |
# - run: npm version ${{ steps.semver.outputs.version }} | |
# working-directory: ./nodejs | |
# - run: npm run build | |
# working-directory: ./nodejs | |
# - run: npm run test | |
# working-directory: ./nodejs | |
# - name: Test Report ${{ matrix.node-version }} | |
# uses: dorny/[email protected] | |
# with: | |
# name: Tests | |
# path: nodejs/junit.json | |
# reporter: mocha-json | |
# - name: Upload coverage reports to Codecov | |
# if: contains(matrix.node-version, '20.x') | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# directory: nodejs/coverage | |
# - run: cp README.md ./nodejs/README.md | |
# - run: npm publish --tag ea | |
# working-directory: ./nodejs | |
# if: contains(matrix.node-version, '20.x') | |
# - run: npm pack | |
# working-directory: ./nodejs | |
# if: contains(matrix.node-version, '20.x') | |
# - uses: actions/upload-artifact@v2 | |
# if: contains(matrix.node-version, '20.x') | |
# with: | |
# name: published-package | |
# path: ./nodejs/*.tgz | |
# - name: cleanup | |
# if: always() | |
# run: rm -f ~/.npmrc ; rm -f ./.npmrc; | |
# docker_build_ea_nodejs: | |
# needs: [build_and_publish_ea_nodejs, docs_build_ea] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# - uses: actions/download-artifact@v2 | |
# with: | |
# name: published-package | |
# path: ./nodejs | |
# - name: Set up QEMU | |
# uses: docker/setup-qemu-action@master | |
# with: | |
# platforms: all | |
# - name: Set up Docker Buildx | |
# id: buildx | |
# uses: docker/setup-buildx-action@master | |
# - name: Login to DockerHub | |
# if: github.event_name != 'pull_request' | |
# uses: docker/login-action@v1 | |
# with: | |
# username: ${{ secrets.DOCKER_HUB_USER }} | |
# password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
# - name: Build | |
# uses: docker/build-push-action@v2 | |
# with: | |
# builder: ${{ steps.buildx.outputs.name }} | |
# context: ./nodejs/ | |
# file: ./nodejs/Dockerfile | |
# platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | |
# push: true | |
# tags: | | |
# betterweb/service-base:ea-node | |
# betterweb/service-base:node-${{ needs.build_and_publish_ea_nodejs.outputs.version }} | |
# docs_build_ea: | |
# runs-on: ubuntu-latest | |
# needs: [build_and_publish_ea_nodejs] | |
# strategy: | |
# matrix: | |
# node-version: [20.x] | |
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: "npm" | |
# cache-dependency-path: documentation/package-lock.json | |
# - run: npm ci | |
# working-directory: documentation/ | |
# - run: npm run build | |
# working-directory: documentation/ | |
# - name: Update site | |
# uses: cloudflare/[email protected] | |
# with: | |
# apiToken: ${{ secrets.CF_API_TOKEN }} | |
# accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
# command: pages publish documentation/.vuepress/dist --project-name=bsb-documentation --commit-dirty=true --branch=ea |