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
50 changes: 32 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,33 @@ on:
required: true
type: choice
description: Which version should be published?
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
options: [patch, minor, major, prepatch, preminor, premajor, prerelease]
tag:
required: true
type: choice
description: Which npm tag should this be published to?
options:
- latest
- next
options: [latest, next]

jobs:
create-release:
runs-on: ubuntu-latest
environment: npm-publish
permissions:
contents: write
id-token: write
steps:
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0

- name: Configure Git Identity
run: |
Expand All @@ -38,12 +43,21 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Install changelogen
run: pnpm add -g changelogen
- name: Ensure Latest NPM
run: npm install -g npm@latest

- name: Bump Version and Push
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
PRERELEASE_FLAG=""
if [[ "${{ github.event.inputs.version }}" == pre* ]]; then PRERELEASE_FLAG="--prerelease"; fi
pnpm dlx changelogen@latest --bump --release $PRERELEASE_FLAG --${{ github.event.inputs.version }} --push

- name: Build
run: pnpm run build

- name: Create new version
id: version
- name: Publish to NPM
run: |
pnpm config set //registry.npmjs.org/:_authToken ""
pnpm dlx changelogen --bump --release --${{ github.event.inputs.version }} --publishTag ${{ github.event.inputs.tag }} --push --publish
pnpm dlx changelogen gh release
npm config set //registry.npmjs.org/:_authToken ""
npm publish --provenance --access public --tag ${{ github.event.inputs.tag }}
18 changes: 0 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
# Changelog

## v0.0.3-0


### 🤖 CI

- **release:** Trigger new create release workflow and bump version ([#15](https://github.com/ambitiondev/dynamic-url/pull/15))

### ❤️ Contributors

- Berrie Nachtweh ([@bnachtweh](https://github.com/bnachtweh))

## [0.0.2](https://github.com/ambitiondev/dynamic-url/compare/dynamic-url-v0.0.1...dynamic-url-v0.0.2) (2026-01-15)


### Bug Fixes

* **release:** make sure the release gets done following v4 ([#9](https://github.com/ambitiondev/dynamic-url/issues/9)) ([9b156a2](https://github.com/ambitiondev/dynamic-url/commit/9b156a2d40399e46663f0edf6c5ab6526bf0482d))