Skip to content

Develop (#102)

Develop (#102) #40

Workflow file for this run

name: Publish to NPM
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
export-google-ads-api-version:
uses: ./.github/workflows/export-google-ads-api-version.yml
with:
environment: production
build:
name: Build
needs: export-google-ads-api-version
uses: ./.github/workflows/template.yml
with:
node-version: 22
google-ads-api-version: ${{ needs.export-google-ads-api-version.outputs.google-ads-api-version }}
test: false
build: true
import-suffix: .js
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
environment: production
permissions: write-all
steps:
- uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build 22
path: dist
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Publish
run: |
npm version ${GITHUB_REF#refs/tags/v} --no-git-tag-version
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
cleanup:
name: Cleanup
needs: publish
uses: ./.github/workflows/cleanup.yml
with:
environment: production