From df8345bc59150179e725f4264e1cf0413a1e1037 Mon Sep 17 00:00:00 2001 From: mikhail-klimko Date: Thu, 18 Jul 2024 19:03:06 +0300 Subject: [PATCH] fix: release-drafter permissions --- .github/workflows/create-release.yaml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/create-release.yaml diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml new file mode 100644 index 000000000..3e6325258 --- /dev/null +++ b/.github/workflows/create-release.yaml @@ -0,0 +1,36 @@ +## Reference: https://github.com/release-drafter/release-drafter +name: Create Release + +on: + push: + branches: + - master + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up jq + uses: dcarbone/install-jq-action@v1.0.1 + + - name: Get release version from service.yaml + run: | + RELEASE_VERSION=$(jq -r '.version' package.json ) + echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV + + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + publish: true + version: ${{ env.RELEASE_VERSION }} + config-name: release-drafter.yaml