Skip to content

Commit

Permalink
CI stack: permissions needed to make release
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Feb 10, 2022
1 parent 0fa606e commit ca3b1fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
tags: [ 'v*' ]
pull_request:
types: [ opened, synchronize]
workflow_dispatch:

# For making a release, we need write permissions.
# TODO: if we split out a release job from the build job, we could make permissions more fine-grained.
permissions:
contents: write

jobs:
build:
Expand Down Expand Up @@ -132,6 +138,7 @@ jobs:
if: >-
startsWith(github.ref, 'refs/tags/v')
&& runner.os == 'Linux'
&& matrix.ghc == '9.0.2'
run: |
export BNFC_BIN=bnfc-${BNFC_VERSION}-linux.binary
cp -p ${BNFC_EXE} ${BNFC_BIN}
Expand All @@ -142,6 +149,7 @@ jobs:
if: >-
startsWith(github.ref, 'refs/tags/v')
&& runner.os == 'Linux'
&& matrix.ghc == '9.0.2'
uses: softprops/action-gh-release@v1
with:
draft: true
Expand Down

0 comments on commit ca3b1fc

Please sign in to comment.