Skip to content

Commit 9f8cb66

Browse files
committed
Document and fix github release action
1 parent 34380f1 commit 9f8cb66

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ci
22

3-
on: [push]
3+
on: [push, workflow_call]
44

55
jobs:
66
build:

.github/workflows/release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,19 @@ jobs:
1717
- name: Build all packages
1818
shell: nix develop -c bash -eo pipefail -l {0}
1919
run: yarn build
20-
- name: Publish fastify-renderer
20+
- id: npm-publish
21+
name: Publish fastify-renderer
2122
uses: JS-DevTools/npm-publish@v1
2223
with:
2324
token: ${{ secrets.NPM_TOKEN }}
2425
package: ./packages/fastify-renderer/package.json
25-
access: public
26+
access: public
27+
- name: Push version tag to github
28+
uses: actions-ecosystem/action-push-tag@v1
29+
with:
30+
tag: ${{ steps.npm-publish.outputs.version }}
31+
- name: Publish Release to github
32+
uses: "marvinpinto/action-automatic-releases@latest"
33+
with:
34+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
35+
prerelease: false

Contributing.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# Fastify is an OPEN Open Source Project
1+
# Contributing to fastify-renderer
2+
3+
See below for information on how fastify-renderer's community is governed.
4+
## Releases
5+
6+
Bump the version with `npm version <minor|major|patch>` then commit the change to git. When your changes get pushed/merged to `main` on github, Github Actions will run the `release` workflow and automatically publish the release to NPM.
7+
8+
## fastify-renderer is an OPEN Open Source Project
29

310
## What?
411

@@ -36,10 +43,6 @@ The contributors to the Fastify's plugins must attend the same rules of the Fast
3643
For this scope we suggest to adopt a tool like [`releasify`](https://github.com/fastify/releasify) to archive this.
3744
1. PR opened by bots (like Greenkeeper) can be merged if the CI is green and the Node.js versions supported are the same of the plugin.
3845

39-
## Releases
40-
41-
Bump the version with `npm version <minor|major|patch>` then run `npm publish`.
42-
4346
## Changes to this arrangement
4447

4548
This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.

0 commit comments

Comments
 (0)