Skip to content
Open
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
118 changes: 118 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: release

on:
push:
branches: [main]
pull_request:
types: [closed]
branches: [main]
# this is required to trigger releases when the release PR is merged, or to rerun a release if needed
workflow_dispatch:

permissions: {}

jobs:
# Parse commits since the last tag, push a `release/vX.Y.Z` branch, open
# or update a draft release PR, and close any superseded release PRs
# (e.g. `release/v1.0.1` when the bump is now `release/v1.1.0`).
pr:
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
permissions:
contents: write # push the `release/vX.Y.Z` branch and delete superseded ones
pull-requests: write # create a release PR, update its body, close superseded PRs
steps:
- uses: danielroe/uppt/pr@7bcfb5397c37202ef882363f755423130419d28a # v0.5.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
packages: |
aliases
core
fetchindex
newest
oldest
opt
parsefiles
ranges
static

# The release PR was merged: tag the squash commit, cut a GitHub release
# from the PR body, and dispatch the publish workflow. The `release/v`
# head-ref guard keeps regular feature-PR merges from triggering this;
# the head-repo guard keeps merged fork PRs from triggering it.
release:
if: |
github.event_name == 'pull_request'
&& github.event.pull_request.merged == true
&& startsWith(github.event.pull_request.head.ref, 'release/v')
&& github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
concurrency:
group: release-${{ github.event.pull_request.number }}
cancel-in-progress: false
permissions:
contents: write # push the `vX.Y.Z` tag and create the GitHub release
actions: write # `gh workflow run release.yml --ref vX.Y.Z` chained dispatch
steps:
- uses: danielroe/uppt/release@7bcfb5397c37202ef882363f755423130419d28a # v0.5.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
packages: |
aliases
core
fetchindex
newest
oldest
opt
parsefiles
ranges
static

# The chained dispatch from `release` lands here as a `workflow_dispatch`
# event on a `vX.Y.Z` tag ref. The `pack` job installs deps, runs
# `pnpm pack` (or `npm pack`), and uploads the tarball as a workflow
# artifact. See "Lifecycle scripts" below for what runs where. Manual
# recovery uses the same path (Run workflow -> pick a `v*` tag).
pack:
if: github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
concurrency:
group: pack-${{ github.ref }}
cancel-in-progress: false
permissions: {}
outputs:
files: ${{ steps.pack.outputs.files }}
steps:
- id: pack
uses: danielroe/uppt/pack@7bcfb5397c37202ef882363f755423130419d28a # v0.5.5
with:
packages: |
aliases
core
fetchindex
newest
oldest
opt
parsefiles
ranges
static

# `publish` downloads the prebuilt tarball from the pack job's
# artifact and stages it for publish.
publish:
if: |
github.event_name == 'workflow_dispatch'
&& startsWith(github.ref, 'refs/tags/v')
&& needs.pack.outputs.files != '[]'
needs: pack
runs-on: ubuntu-latest
concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: false
permissions:
id-token: write # OIDC claim for npm trusted publisher
environment: npm # must match the trusted-publisher entry on npmjs.com
steps:
- uses: danielroe/uppt/publish@7bcfb5397c37202ef882363f755423130419d28a # v0.5.5
with:
files: ${{ needs.pack.outputs.files }}
2 changes: 1 addition & 1 deletion aliases/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/aliases",
"version": "0.0.2",
"version": "1.0.0",
"description": "available aliases for sets of Node.js versions",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/core",
"version": "0.3.0",
"version": "1.0.0",
"description": "nodevu core API: comprehensive node.js version tooling",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion fetchindex/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/fetchindex",
"version": "0.1.0",
"version": "1.0.0",
"description": "A tool that fetches the /dist/index.json file from the Node.js website.",
"main": "index.js",
"files": ["index.js", "LICENSE"],
Expand Down
2 changes: 1 addition & 1 deletion newest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/newest",
"version": "0.1.0",
"version": "1.0.0",
"description": "a module that returns the newest lts or security release of the release line passed.",
"main": "index.js",
"files": ["index.js", "LICENSE"],
Expand Down
2 changes: 1 addition & 1 deletion oldest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/oldest",
"version": "0.1.0",
"version": "1.0.0",
"description": "a module that returns the oldest lts or security release of the release line passed.",
"main": "index.js",
"files": ["index.js", "LICENSE"],
Expand Down
2 changes: 1 addition & 1 deletion opt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/opt",
"version": "0.1.0",
"version": "1.0.0",
"description": "internal options parser for @nodevu packages.",
"main": "index.js",
"files": ["index.js", "LICENSE"],
Expand Down
2 changes: 1 addition & 1 deletion parsefiles/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/parsefiles",
"version": "0.0.3",
"version": "1.0.0",
"description": "parse the files identifiers from Node.js",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion ranges/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/ranges",
"version": "0.2.0",
"version": "1.0.0",
"description": "support node's unofficial alias namespace",
"main": "index.js",
"files": ["index.js", "LICENSE"],
Expand Down
2 changes: 1 addition & 1 deletion static/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/static",
"version": "0.0.4",
"version": "1.0.0",
"description": "static outputs from @nodevu/core",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion translate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodevu/translate",
"version": "0.0.1",
"version": "1.0.0",
"description": "a translation layer between the nodevu naming mechanism and the Node.js supported mechanism. Neceessary for legacy interop.",
"keywords": ["nodevu", "node", "nodejs", "versions", "supported"],
"homepage": "https://github.com/cutenode/nodevu#readme",
Expand Down
Loading