Skip to content

Update for 2.15.4-beta.dev.20260401.1 #379

Update for 2.15.4-beta.dev.20260401.1

Update for 2.15.4-beta.dev.20260401.1 #379

Workflow file for this run

on:
push:
branches:
- main
- master
- development
env:
REPO_NAME: ${{ github.event.repository.name }}
EXTRA_RELEASE_ARGS: ${{ github.ref == 'refs/heads/development' && '--prerelease' || '' }}
EXTRA_NPM_ARGS: ${{ github.ref == 'refs/heads/development' && '--tag dev' || '--tag latest' }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
packages: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- name: Update npm
run: npm install -g npm@latest
- name: Parse package.json
id: set_var
run: |
content=`cat ./package.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=packageJson::$content"
- run: |
echo "${{fromJson(steps.set_var.outputs.packageJson).version}}"
typesversion=${{fromJson(steps.set_var.outputs.packageJson).version}}
echo "$typesversion"
echo "TYPES_VERSION=$typesversion" >> $GITHUB_ENV
- name: zip
run: |
cd ../
zip -r $REPO_NAME.zip $REPO_NAME -x "$REPO_NAME/.git/*" "$REPO_NAME/.github/*" "$REPO_NAME/node_modules/*"
- name: Delete release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
run: |
gh release delete "v$TYPES_VERSION" --cleanup-tag --yes
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "v$TYPES_VERSION" \
--repo="$GITHUB_REPOSITORY" \
--target="${{ github.sha }}" \
--title="v$TYPES_VERSION" \
--generate-notes \
$EXTRA_RELEASE_ARGS \
"../$REPO_NAME.zip#$REPO_NAME.zip"
- run: npm publish --provenance --access public $EXTRA_NPM_ARGS