Skip to content

Commit

Permalink
env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Feb 21, 2024
1 parent 7a1d75b commit 912ac87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: setup dependencies
uses: actions/setup-go@v2
- name: setup release environment
run: |-
echo 'MIXPANEL_PROJECT_TOKEN=${{ secrets.MIXPANEL_PROJECT_TOKEN }}' > .release-env
echo 'LILICO_TOKEN=${{ secrets.LILICO_TOKEN }}' >> .release-env
echo 'APP_VERSION=$(basename ${GITHUB_REF})' >> .release-env
echo 'BUILD_TIME=$(date --iso-8601=seconds)' >> .release-env
echo 'VERSION=${{github.ref_name}}' >> .release-env
echo 'COMMIT=${{ github.sha }}' >> .release-env
echo 'CGO_FLAGS="-O2 -D__BLST_PORTABLE__"' >> .release-env
echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> .release-env
- name: release publish
run: make release
run: make release
env:
MIXPANEL_PROJECT_TOKEN: ${{ secrets.MIXPANEL_PROJECT_TOKEN }}
LILICO_TOKEN: ${{ secrets.LILICO_TOKEN }}
APP_VERSION: $(basename ${GITHUB_REF})
BUILD_TIME: $(date --iso-8601=seconds)
VERSION: ${{github.ref_name}}
COMMIT: ${{ github.sha }}
CGO_FLAGS: "-O2 -D__BLST_PORTABLE__"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ release:
docker run \
--rm \
-e CGO_ENABLED=1 \
--env-file .release-env \
-e MIXPANEL_PROJECT_TOKEN=${MIXPANEL_PROJECT_TOKEN} \
-e LILICO_TOKEN=${LILICO_TOKEN} \
-e APP_VERSION=$(basename ${GITHUB_REF}) \
-e BUILD_TIME=$(date --iso-8601=seconds) \
-e VERSION=${GITHUB_REF} \
-e COMMIT=${GITHUB_SHA} \
-e CGO_FLAGS="-O2 -D__BLST_PORTABLE__" \
-e GITHUB_TOKEN=${GITHUB_TOKEN} \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
Expand Down

0 comments on commit 912ac87

Please sign in to comment.