Skip to content

Commit

Permalink
Update release CI config and build process
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Sep 3, 2024
1 parent 6865c4a commit 4bec75e
Showing 1 changed file with 1 addition and 41 deletions.
42 changes: 1 addition & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,46 +210,6 @@ jobs:
VERSION=$(node -e "console.log(require('./package.json').version);")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Get previous release tag
id: prev_release
uses: actions/github-script@v6
with:
script: |
const { data: releases } = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
});
if (releases.length > 0) {
return releases[0].tag_name;
} else {
return null;
}
- name: Get commits since last release
id: commits
uses: actions/github-script@v6
with:
script: |
const previousTag = steps.prev_release.outputs.result;
let commits;
if (previousTag) {
const { data } = await github.repos.compareCommits({
owner: context.repo.owner,
repo: context.repo.repo,
base: previousTag,
head: 'HEAD',
});
commits = data.commits;
} else {
const { data } = await github.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
sha: 'HEAD',
});
commits = data;
}
return commits.map(commit => `- ${commit.commit.message} (${commit.sha})`).join('\n');
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -259,7 +219,7 @@ jobs:
tag_name: v${{ env.VERSION }}
release_name: v${{ env.VERSION }}
body: |
${{ steps.commits.outputs.result }}
Changes in this Release
draft: true
prerelease: false

Expand Down

0 comments on commit 4bec75e

Please sign in to comment.