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
20 changes: 17 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,23 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2 # last 2 commits
fetch-depth: 0 # need every commit in the pushed range
- name: check version change
id: check
env:
BEFORE: ${{ github.event.before }}
run: |
PREV_VERSION=$(git show HEAD^:package.json | jq -r .version)
CURR_VERSION=$(jq -r .version package.json)
echo "Previous: $PREV_VERSION"
# Compare against where the branch pointed before this push
if [ -z "$BEFORE" ] \
|| [ "$BEFORE" = "0000000000000000000000000000000000000000" ] \
|| ! git cat-file -e "$BEFORE^{commit}" 2>/dev/null; then
# New branch, force push, or a baseline that no longer exists:
PREV_VERSION=""
else
PREV_VERSION=$(git show "$BEFORE:package.json" | jq -r .version)
fi
echo "Previous: ${PREV_VERSION:-<unknown>}"
echo "Current: $CURR_VERSION"
if [ "$PREV_VERSION" != "$CURR_VERSION" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -51,6 +61,9 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write # needed to create tags and releases
outputs:
# Exposed so publish can skip an already-released version
tagged: ${{ steps.tag-check.outputs.exists == 'false' }}
steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -80,6 +93,7 @@ jobs:

publish:
needs: release
if: needs.release.outputs.tagged == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [3.1.0] - 2026-07-26
### [3.1.1] - 2026-07-26

- chore: declare Node.js 22 as the floor
- feat(packet): Extended DNS Errors (RFC 8914) — `Packet.EDE` INFO-CODEs, an EDE
Expand Down Expand Up @@ -109,4 +109,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
[2.3.0]: https://github.com/lsongdev/node-dns/releases/tag/v2.3.0
[2.2.0]: https://github.com/lsongdev/node-dns/releases/tag/v2.2.0
[2.2.1]: https://github.com/lsongdev/node-dns/releases/tag/v2.2.1
[3.1.0]: https://github.com/lsongdev/node-dns/releases/tag/v3.1.0
[3.1.1]: https://github.com/lsongdev/node-dns/releases/tag/v3.1.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dns2",
"version": "3.1.0",
"version": "3.1.1",
"description": "A DNS Server and Client Implementation in Pure JavaScript with no dependencies.",
"main": "index.js",
"types": "ts/index.d.ts",
Expand Down