Merge pull request #51 from fac/dependabot/npm_and_yarn/eslint-9.10.0 #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Draft release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-release-draft: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: release-drafter/release-drafter@v5 | |
id: release-draft | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- name: Compile action with dependencies | |
run: | | |
npm ci | |
npm run prepare | |
- name: Update draft release to point to compiled files | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
exec 19> >( sed -e's/^/::debug::/g' ) | |
BASH_XTRACEFD=19 | |
export DEBUG=api | |
set -x | |
git checkout -b next-release | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add dist/ | |
git commit -m 'Build for ${{ steps.release-draft.outputs.tag_name }}' | |
git push origin HEAD --force | |
RELEASE_URL="repos/${{ github.repository }}/releases/${{ steps.release-draft.outputs.id }}" | |
gh api -X PATCH "$RELEASE_URL" 2>&19 \ | |
--field tag_name="$( gh api "$RELEASE_URL" --jq .tag_name 2>&19 )" \ | |
--field target_commitish=next-release |