Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Feb 21, 2024
1 parent 912ac87 commit 670f7c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: setup dependencies
uses: actions/setup-go@v2
- name: setup release environment
run: |-
echo 'MIXPANEL_PROJECT_TOKEN="${{ MIXPANEL_PROJECT_TOKEN }}"' > .release-env
echo 'LILICO_TOKEN="${{ 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
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 }}
run: make release
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ main
*.pkey

# Local development file generation folder
imports
imports

# Goreleaser .env
.release-env
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,7 @@ release:
docker run \
--rm \
-e CGO_ENABLED=1 \
-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} \
--env-file .release-env \
-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 670f7c1

Please sign in to comment.