Skip to content

chore: release trunk #160

chore: release trunk

chore: release trunk #160

name: Release Please (release-please.yml)
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
VCPKG_NUGET_REPOSITORY: https://github.com/hpcc-systems/hpcc-js-wasm
on:
push:
branches:
- trunk
permissions:
contents: write
pull-requests: write
packages: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Initialize Release Please
id: release
uses: googleapis/release-please-action@v4
with:
target-branch: ${{ github.ref_name }}
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Checkout Sources
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- name: Install NodeJS
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
scope: "@hpcc-js"
- name: Install OS Dependencies
if: ${{ steps.release.outputs.release_created }}
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y git cmake ninja-build wget zip
sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
sudo apt-get install -y python3 python3-pip
sudo apt-get install -y mono-complete
- name: Export GitHub Actions cache environment variables
if: ${{ steps.release.outputs.release_created }}
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Dependencies
if: ${{ steps.release.outputs.release_created }}
run: |
npm ci
sudo npx playwright install chromium --with-deps
npm run install-build-deps
- name: Make nuget.exe executable
if: ${{ steps.release.outputs.release_created }}
run: |
NUGET_PATH=$(./vcpkg/vcpkg fetch nuget | tail -n 1)
chmod +x "$NUGET_PATH"
- name: Setup vcpkg NuGet authentication
if: ${{ steps.release.outputs.release_created }}
run: |
mono `./vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
mono `./vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Lint
if: ${{ steps.release.outputs.release_created }}
run: |
npm run lint
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: |
npm run build
- name: Test
if: ${{ steps.release.outputs.release_created }}
run: |
npm run test
- name: Calculate Coverage
if: ${{ steps.release.outputs.release_created }}
run: |
npm run coverage
# - name: Update Coveralls
# if: ${{ steps.release.outputs.release_created }}
# uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: push stamped release
# if: ${{ steps.release.outputs.release_created }}
# run: |
# git config user.name github-actions[bot]
# git config user.email 4104672+github-actions[bot]@users.noreply.github.com
# git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/${{ github.repository }}.git"
# git commit -a -m 'chore: stamp files for release'
# git push origin
- name: Publish
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm run publish
- name: Purge jsdelivr
if: ${{ steps.release.outputs.release_created }}
run: |
npm run purge-jsdelivr