Skip to content

Commit

Permalink
chore(ci): Implemented publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed May 21, 2024
1 parent 7819c00 commit 4b16f05
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release
'on':
push:
branches:
- master
- next
- beta
- '*.x'
permissions:
contents: read # for checkout

jobs:
release:
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.OBLAKBOT_PAT }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: gpg
with:
gpg_private_key: ${{ secrets.OBLAKBOT_GPG_KEY }}
passphrase: ${{ secrets.OBLAKBOT_GPG_PASS }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/setup-node@v4
with:
cache: npm
node-version: lts/*
- run: npm clean-install
- run: npm audit signatures
- name: Build
run: npm run build
- name: Publish NPM package
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/github
env:
GIT_AUTHOR_NAME: ${{ steps.gpg.outputs.name}}
GIT_AUTHOR_EMAIL: ${{ steps.gpg.outputs.email}}
GIT_COMMITTER_NAME: ${{ steps.gpg.outputs.name}}
GIT_COMMITTER_EMAIL: ${{ steps.gpg.outputs.email}}
GITHUB_TOKEN: ${{ secrets.OBLAKBOT_PAT }}
NPM_TOKEN: ${{ secrets.OBLAKBOT_NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "wordpack",
"name": "@x-wp/wordpack",
"description": "Front-end bundler toolkit for WordPress themes & plugins",
"version": "0.0.0-development",
"license": "MIT",
Expand Down

0 comments on commit 4b16f05

Please sign in to comment.