Skip to content

tweak readme

tweak readme #4

name: Streamdal Apollo Server Plugin - Release
on:
push:
branches:
- main
jobs:
build:
name: Tag and Release
if: ${{ !contains(github.event.head_commit.message, 'norelease') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install --force
- name: Generate new tag (dry run)
uses: mathieudutour/[email protected]
id: get_new_version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
fetch_all_tags: true
- name: Update npm package version
run: |
npm --no-git-tag-version version ${{ steps.get_new_version.outputs.new_version }}
# We do this because other jobs might have written to the repo while this
# job was running and making local changes; without this pull step, we
# might run into an error when performing the auto-commit.
- name: Pull latest changes
run: |
git config user.name github-actions
git config user.email [email protected]
git pull --depth=10
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto_commit
with:
commit_message: Bumped npm package version to ${{ steps.get_new_version.outputs.new_version }}
- name: Create tag
uses: mathieudutour/[email protected]
id: create_tag
with:
commit_sha: ${{ steps.auto_commit.outputs.commit_hash }}
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.get_new_version.outputs.new_version }}
- name: Build
run: npm run build
- name: Release to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}