Skip to content

Release

Release #131

Workflow file for this run

name: Release
on:
push:
branches:
- main
paths:
- .changeset/**
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
NODE_VERSION: 18
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.repository == 'capawesome-team/capacitor-plugins'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: npm ci
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
commit: "chore(release): publish"
title: "chore(release): publish"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Set npm token for GitHub Packages
if: steps.changesets.outputs.published == 'true'
run: npm config set //npm.pkg.github.com/:_authToken ${{ secrets.PAT }}
- name: Publish Sponsorware to GitHub Packages
if: steps.changesets.outputs.published == 'true'
run: node ./scripts/publish-sponsorware.mjs --packages='${{ steps.changesets.outputs.publishedPackages }}'