Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hirasso committed Jun 12, 2023
1 parent 2034868 commit 59c0a61
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This workflow publishes a package to NPM

name: Publish package

on:
release:
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
9 changes: 9 additions & 0 deletions .github/workflows/redeploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Redeploy Docs
on:
push:
branches: [master]

jobs:
redeploy-docs:
uses: swup/.github/.github/workflows/redeploy-docs.yml@master
secrets: inherit
35 changes: 35 additions & 0 deletions .github/workflows/version-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow bumps the package.json version and creates a PR

name: Update package version

on:
workflow_dispatch:
inputs:
segment:
description: 'Semver segment to update'
required: true
default: 'patch'
type: choice
options:
- minor
- patch

jobs:
update-version:
name: Update package version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: echo "Updating ${{ inputs.segment }} version"
- name: Update version
run: npm --no-git-tag-version version ${{ inputs.segment }}
- uses: peter-evans/create-pull-request@v4
with:
base: 'master'
branch: 'version/automated'
title: 'Update package version (automated)'
commit-message: 'Update package version'
body: 'Automated update to ${{ inputs.segment }} version'

0 comments on commit 59c0a61

Please sign in to comment.