Skip to content

fix: publish auth bug #7

fix: publish auth bug

fix: publish auth bug #7

Workflow file for this run

name: Build and Publish Extractor Pack
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Build Extractor"
env:
GH_TOKEN: ${{ github.token }}
run: |
./scripts/create-extractor-pack.sh
- name: "Publish Extractor Pack"
if: github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ github.token }}
run: |
EXTRACTOR_INFO="./codeql-extractor.yml"
EXTRACTOR_NAME="iac"
EXTRACTOR_VERSION=$(grep version $EXTRACTOR_INFO | awk '{print $2}')
echo "[+] ${EXTRACTOR_NAME} (${EXTRACTOR_VERSION})"
tar czf extractor-$EXTRACTOR_NAME.tar.gz extractor-pack
# create release
gh release create "v$EXTRACTOR_VERSION" \
--notes "$EXTRACTOR_NAME Extractor v$EXTRACTOR_VERSION" \
extractor-$EXTRACTOR_NAME.tar.gz