Skip to content

Commit 3b15e7c

Browse files
committed
attempt to fix release workflow
1 parent 6fe47d8 commit 3b15e7c

File tree

3 files changed

+18
-40
lines changed

3 files changed

+18
-40
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ on:
1515
- patch
1616
- minor
1717
- major
18-
release_notes:
19-
type: string
20-
description: "Release notes"
21-
required: true
18+
# release_notes:
19+
# type: string
20+
# description: "Release notes"
21+
# required: true
2222

2323
jobs:
2424
release:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- name: Generate token
28-
id: generate_token
29-
uses: tibdex/github-app-token@v1
30-
with:
31-
app_id: ${{ secrets.WORKFLOWS_GITHUB_APP_ID }}
32-
private_key: ${{ secrets.WORKFLOWS_GITHUB_APP_PRIVATE_KEY }}
27+
# - name: Generate token
28+
# id: generate_token
29+
# uses: tibdex/github-app-token@v1
30+
# with:
31+
# app_id: ${{ secrets.WORKFLOWS_GITHUB_APP_ID }}
32+
# private_key: ${{ secrets.WORKFLOWS_GITHUB_APP_PRIVATE_KEY }}
3333

3434
- name: Checkout code
3535
uses: actions/checkout@v3
36-
with:
37-
token: ${{ steps.generate_token.outputs.token }}
36+
# with:
37+
# token: ${{ steps.generate_token.outputs.token }}
3838

3939
- name: Set up Deno
4040
uses: denoland/setup-deno@v2
@@ -48,21 +48,21 @@ jobs:
4848
- name: Bump version
4949
id: bump_version
5050
run: |
51-
VERSION=$(deno run -A scripts/bump_version.ts ${{ inputs.release_type }} ${{ inputs.release_notes }})
51+
VERSION=$(deno run -A scripts/bump_version.ts ${{ inputs.release_type }})
5252
echo "release_version=$VERSION" >> $GITHUB_OUTPUT
5353
5454
- name: Create release
5555
uses: softprops/action-gh-release@v1
5656
with:
57-
body: ${{ inputs.release_notes }}
5857
tag_name: v${{ steps.bump_version.outputs.release_version }}
5958
files: |
6059
dist/*
61-
CHANGELOG.md
6260
6361
- name: Commit and push changes
6462
run: |
6563
# Commit and push changes
66-
git add CHANGELOG.md
67-
git commit -m "[skip ci] update changelog for version ${{ steps.bump_version.outputs.release_version }}"
64+
git config --global user.name "github-action"
65+
git config --global user.email "github-action@nanoapi.io"
66+
git add deno.json
67+
git commit -m "[skip ci] update version ${{ steps.bump_version.outputs.release_version }}"
6868
git push

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.7",
2+
"version": "1.0.8",
33
"workspace": [
44
"./packages/app",
55
"./packages/cli",

scripts/bump_version.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ if (
88
console.error("Invalid release type");
99
Deno.exit(1);
1010
}
11-
const releaseNotes: string = Deno.args[1];
12-
if (!releaseNotes) {
13-
console.error("Release notes are required");
14-
Deno.exit(1);
15-
}
1611

1712
const denoJsonPath = path.resolve(
1813
import.meta.dirname as string,
@@ -42,22 +37,5 @@ await Deno.writeTextFile(
4237
JSON.stringify(denoJson, null, 2) + "\n",
4338
);
4439

45-
const changeLogPath = path.resolve(
46-
import.meta.dirname as string,
47-
"..",
48-
"CHANGELOG.md",
49-
);
50-
const currentChangeLog = await Deno.readTextFile(changeLogPath);
51-
52-
const newContent =
53-
`## [${newVersion}] - ${new Date().toISOString().split("T")[0]}` + "\n\n" +
54-
releaseNotes + "\n";
55-
const allContent = newContent + "\n" + currentChangeLog;
56-
57-
await Deno.writeTextFile(
58-
changeLogPath,
59-
allContent,
60-
);
61-
6240
console.log(newVersion);
6341
Deno.exit(0);

0 commit comments

Comments
 (0)