Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:
inputs:
version:
description: "The version number to tag and release"
description: 'The version number to tag and release'
required: true
type: string
prerelease:
description: "Release as pre-release"
description: 'Release as pre-release'
required: false
type: boolean
default: false
Expand Down Expand Up @@ -38,17 +38,21 @@ jobs:
version: latest
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Bump version and push commit
- name: Bump version
id: bump
run: |
new_version=$(pnpm version ${{ inputs.version }} --no-git-tag-version | tail -n 1)
echo "version=$new_version" >> $GITHUB_OUTPUT
- name: Commit version bump
run: |
pnpm version ${{ inputs.version }} --no-git-tag-version
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git commit -a -m "Bumped v${{ inputs.version }}"
git commit -a -m "Bumped ${{ steps.bump.outputs.version }}"
git push origin HEAD:${{ github.ref }}
- name: Publish new version
run: |
npm install npm -g
npm publish --access public --tag ${{ inputs.prerelease == true && 'next' || 'latest' }}
- name: Create release notes
run: |
npx @matteo.collina/release-notes -a ${{ secrets.GITHUB_TOKEN }} -t v${{ inputs.version }} -r ${{ github.repository }} ${{ github.event.inputs.prerelease == 'true' && '-p' || '' }} -c ${{ github.ref }}
npx @matteo.collina/release-notes -a ${{ secrets.GITHUB_TOKEN }} -t ${{ steps.bump.outputs.version }} -r ${{ github.repository }} ${{ github.event.inputs.prerelease == 'true' && '-p' || '' }} -c ${{ github.ref }}
7 changes: 2 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { create as createService, platformaticService } from '@platformatic/service'
import fp from 'fastify-plugin'
import { plugin } from './plugin.js'
import { schema } from './schema.js'

Expand All @@ -8,11 +9,7 @@ export async function php (app, capability) {
}

export async function create (configOrRoot, sourceOrConfig, context) {
return createService(configOrRoot, sourceOrConfig, {
schema,
applicationFactory: php,
...context
})
return createService(configOrRoot, sourceOrConfig, { schema, applicationFactory: fp(php), ...context })
}

export { Generator } from './generator.js'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"dependencies": {
"@fastify/static": "^8.2.0",
"@platformatic/php-node": "^1.3.0",
"@platformatic/service": "^3.0.0",
"fastify-plugin": "^5.0.0"
"@platformatic/service": "^3.0.2",
"fastify-plugin": "^5.0.1"
},
"devDependencies": {
"cleaner-spec-reporter": "^0.5.0",
Expand Down
88 changes: 44 additions & 44 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.