Skip to content

Fix Github Actions workflow #23

Fix Github Actions workflow

Fix Github Actions workflow #23

Workflow file for this run

name: Release Go Binary
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo apt install golang curl jq git
- run: git clone https://github.com/verdigado/pfa-ldap-auth.git
- run: bash -c "cd pfa-ldap-auth; go get ."
- run: bash -c "cd pfa-ldap-auth; go build ."
- run: 'export RESPONSE=$(curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/verdigado/pfa-ldap-auth/releases -d "{\"tag_name\":\"${{ github.ref }}\",\"target_commitish\":\"master\",\"name\":\"${{ github.ref }}\",\"body\":\"Version ${{ github.ref }}\",\"draft\":false,\"prerelease\":false,\"generate_release_notes\":false}")'
- run: export RELEASE_ID=$(echo "$RESPONSE" | jq .id)
- run: echo "Attaching file to release $RELEASE_ID"
- run: ls -lah pfa-ldap-auth/pfa-ldap-auth
- run: curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @"pfa-ldap-auth/pfa-ldap-auth" "https://uploads.github.com/repos/verdigado/pfa-ldap-auth/releases/$RELEASE_ID/assets?name=pfa-ldap-auth"

Check failure on line 20 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
- run: echo "Finished"