Skip to content

Commit 7e2216e

Browse files
authored
Merge pull request #25 from niledatabase/alpha
fix: -release fixes
2 parents c835a75 + b26f1a0 commit 7e2216e

6 files changed

Lines changed: 58 additions & 41 deletions

File tree

.github/workflows/prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish CLI Prerelease
33
on:
44
push:
55
branches:
6-
- main
6+
- alpha
77

88
jobs:
99
release:

.github/workflows/release.yml

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,58 @@
1-
name: Publish CLI Stable Release
1+
name: Publish CLI Release
22

33
on:
44
push:
55
branches:
6-
- stable
6+
- main
77

88
jobs:
9-
build:
9+
release:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
1313
packages: write
1414
steps:
15-
- uses: actions/checkout@v4
15+
- name: Checkout
16+
uses: actions/checkout@v4
1617
with:
1718
fetch-depth: 0
18-
ref: stable
19+
token: ${{secrets.PAT}}
1920

20-
- name: Enable Corepack
21+
- name: Enable Corepack before setting up Node
2122
run: corepack enable
2223

23-
- uses: actions/setup-node@v4
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
2426
with:
2527
node-version: "20.x"
2628

27-
- name: Setup npm auth
29+
- name: Authenticate to npm
2830
run: |
2931
echo "registry=https://registry.npmjs.org/" >> .npmrc
3032
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
33+
npm whoami
3134
env:
3235
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3336

34-
- name: Install and Build
35-
run: |
36-
yarn install --immutable
37-
yarn build
38-
yarn test
37+
- name: Install dependencies
38+
run: yarn install --immutable
39+
40+
- name: Build
41+
run: yarn build
42+
43+
- name: Run tests
44+
run: yarn test
3945

4046
- name: Version and Publish
41-
run: |
42-
git config user.name "${{ github.actor }}"
43-
git config user.email "${{ github.actor }}@users.noreply.github.com"
44-
yarn version --message "chore(release): %s [skip ci]"
45-
yarn publish --access public
4647
env:
48+
GITHUB_TOKEN: ${{ secrets.PAT }}
4749
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48-
49-
- name: Publish to GitHub Packages
5050
run: |
51-
echo "registry=https://npm.pkg.github.com/" > .npmrc
51+
# Configure both npm and GitHub Package registries
52+
echo "registry=https://registry.npmjs.org/" > .npmrc
53+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
54+
echo "@niledatabase:registry=https://npm.pkg.github.com" >> .npmrc
5255
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
53-
yarn publish --access public --registry https://npm.pkg.github.com/
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
57-
- name: Create Release
58-
uses: actions/github-script@v6
59-
with:
60-
github-token: ${{ secrets.GITHUB_TOKEN }}
61-
script: |
62-
const tag = require('./package.json').version;
63-
await github.request(`POST /repos/${{ github.repository }}/releases`, {
64-
tag_name: "v" + tag,
65-
generate_release_notes: true
66-
});
56+
57+
# Run semantic-release with prerelease configuration
58+
npx semantic-release

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- "**"
7+
pull_request:
8+
branches:
9+
- "**"
710

811
jobs:
912
test:

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## [1.0.9-alpha.3](https://github.com/niledatabase/cli/compare/v1.0.9-alpha.2...v1.0.9-alpha.3) (2025-02-06)
2+
3+
4+
### Bug Fixes
5+
6+
* test on pull request ([de27a9b](https://github.com/niledatabase/cli/commit/de27a9b0b755b0ca8f4c69ab42d497e83a4733e2))
7+
8+
## [1.0.9-alpha.2](https://github.com/niledatabase/cli/compare/v1.0.9-alpha.1...v1.0.9-alpha.2) (2025-02-06)
9+
10+
11+
### Bug Fixes
12+
13+
* -main release should now be correct ([88f9291](https://github.com/niledatabase/cli/commit/88f92910c1cbf267994d7ec9dab5a1fdc771ab89))
14+
15+
## [1.0.9-alpha.1](https://github.com/niledatabase/cli/compare/v1.0.8...v1.0.9-alpha.1) (2025-02-06)
16+
17+
18+
### Bug Fixes
19+
20+
* -fix prerelease ([afc4c09](https://github.com/niledatabase/cli/commit/afc4c09c633939f498f5cf8202cf8d96a267879d))
21+
* -semantic release ([c4f78d4](https://github.com/niledatabase/cli/commit/c4f78d498a7d9e7183d21e8cd6e87696f9dd5957))
22+
123
## [1.0.8](https://github.com/niledatabase/cli/compare/v1.0.7...v1.0.8) (2025-02-06)
224

325

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "niledatabase",
3-
"version": "1.0.8",
3+
"version": "1.0.9-alpha.3",
44
"description": "Command line interface for Nile databases",
55
"main": "dist/index.js",
66
"bin": {
@@ -36,11 +36,11 @@
3636
"release": {
3737
"branches": [
3838
{
39-
"name": "main",
39+
"name": "alpha",
4040
"prerelease": true
4141
},
4242
{
43-
"name": "stable"
43+
"name": "main"
4444
}
4545
],
4646
"plugins": [

0 commit comments

Comments
 (0)