Skip to content

Commit

Permalink
fix: 💩 test create changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed Nov 1, 2023
1 parent fee3456 commit a241c27
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 111 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
echo "$changelog"
echo "$changelog" >> $GITHUB_STEP_SUMMARY
echo "$changelog" >> /tmp/CHANGELOG.md
{
echo 'CHANGELOG<<EOF'
Expand All @@ -127,7 +128,6 @@ jobs:
echo 'CHANGELOG<<EOF' >> $GITHUB_ENV
echo $changelog >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo $changelog >> /tmp/CHANGELOG.md
working-directory: ${{ steps.get-directory.outputs.directory }}
env:
MATRIX_PACKAGE: ${{ matrix.package }}
Expand All @@ -143,6 +143,32 @@ jobs:
env:
MATRIX_PACKAGE: ${{ matrix.package }}

- name: 🗑️ Create release
uses: actions/github-script@v6
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
script: |
const fs = require('fs');
const { TAG } = process.env;
const body = fs.readFileSync('/tmp/CHANGELOG.md', 'utf8');
console.log(body)
try {
// const response = await github.rest.repos.createRelease({
// draft: true,
// generate_release_notes: false,
// name: `${TAG}`,
// owner: context.repo.owner,
// prerelease: true,
// repo: context.repo.repo,
// tag_name: `${TAG}`,
// body,
// });
} catch (error) {
core.setFailed(error.message);
}
env:
TAG: ${{ matrix.package }}@v${{ steps.determine_next_version.outputs.NEXT_VERSION }}

# - name: Manually next version number
# if: inputs.releaseVersion != 'auto'
# run: |
Expand Down
Loading

0 comments on commit a241c27

Please sign in to comment.