Compare commits
12 Commits
0.1.0-alph
...
0.1.0-alph
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5667d8dbb6 | ||
![]() |
602c33a1eb | ||
![]() |
f5ca38ef0b | ||
![]() |
5531f86da1 | ||
![]() |
cdb497123b | ||
![]() |
8d6e218bf4 | ||
![]() |
ee83d00866 | ||
![]() |
3b39c71835 | ||
![]() |
a4cb86b386 | ||
![]() |
00e1397586 | ||
![]() |
939852cb05 | ||
![]() |
7d71f66080 |
68
.github/workflows/release.yaml
vendored
68
.github/workflows/release.yaml
vendored
@@ -3,32 +3,56 @@ on:
|
|||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
releases-windows:
|
releases:
|
||||||
name: Release Authorizer Binary
|
name: Release Authorizer Binary
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
goos: [windows]
|
|
||||||
goarch: [amd64]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get install build-essential
|
run: |
|
||||||
- name: Install windows dependencies
|
sudo apt-get install build-essential wget zip gcc-mingw-w64 && \
|
||||||
if: ${{ matrix.goos == 'windows'}}
|
sudo apt-get remove --auto-remove golang-go && \
|
||||||
run: sudo apt-get install gcc-mingw-w64
|
sudo rm -rf /usr/bin/go &&\
|
||||||
|
wget --progress=dot:mega https://golang.org/dl/go1.17.1.linux-amd64.tar.gz -O go-linux.tar.gz && \
|
||||||
|
sudo tar -zxf go-linux.tar.gz && \
|
||||||
|
sudo mv go /usr/bin/ && \
|
||||||
|
sudo mkdir -p /go/bin /go/src /go/pkg && \
|
||||||
|
export GO_HOME=/usr/bin/go && \
|
||||||
|
export GOPATH=/go && \
|
||||||
|
export PATH=${GOPATH}/bin:${GO_HOME}/bin/:$PATH && \
|
||||||
|
echo "/usr/bin/go/bin" >> $GITHUB_PATH
|
||||||
|
go version && \
|
||||||
|
wget --no-check-certificate --progress=dot:mega https://github.com/wangyoucao577/assets-uploader/releases/download/v0.3.0/github-assets-uploader-v0.3.0-linux-amd64.tar.gz -O github-assets-uploader.tar.gz && \
|
||||||
|
tar -zxf github-assets-uploader.tar.gz && \
|
||||||
|
sudo mv github-assets-uploader /usr/sbin/ && \
|
||||||
|
sudo rm -f github-assets-uploader.tar.gz && \
|
||||||
|
github-assets-uploader -version
|
||||||
|
- name: Print Go paths
|
||||||
|
run: whereis go
|
||||||
|
- name: Print Go Version
|
||||||
|
run: go version
|
||||||
- name: Set VERSION env
|
- name: Set VERSION env
|
||||||
run: echo VERSION=$(basename ${GITHUB_REF}) >> ${GITHUB_ENV}
|
run: echo VERSION=$(basename ${GITHUB_REF}) >> ${GITHUB_ENV}
|
||||||
- name: Set GO_ENABLED env
|
- name: Copy .env file
|
||||||
run: echo CGO_ENABLED=1 >> ${GITHUB_ENV}
|
run: mv .env.sample .env
|
||||||
- name: Set Windows C Compiler GO env
|
- name: Package files for windows
|
||||||
if: ${{ matrix.goos == 'windows'}}
|
run: |
|
||||||
run: echo CC=/usr/bin/x86_64-w64-mingw32-gcc >> ${GITHUB_ENV}
|
make clean && CGO_ENABLED=1 GOOS=windows CC=/usr/bin/x86_64-w64-mingw32-gcc make
|
||||||
- uses: wangyoucao577/go-release-action@v1.20
|
zip -vr authorizer-${VERSION}-windows-amd64.zip .env app build templates
|
||||||
with:
|
- name: Package files for linux
|
||||||
github_token: ${{ secrets.RELEASE_TOKEN }}
|
run: |
|
||||||
goos: ${{ matrix.goos }}
|
make clean && CGO_ENABLED=1 make
|
||||||
goarch: ${{ matrix.goarch }}
|
tar cvfz authorizer-${VERSION}-linux-amd64.tar.gz .env app build templates
|
||||||
build_command: make clean && make
|
- name: Upload assets
|
||||||
md5sum: FALSE
|
run: |
|
||||||
extra_files: .env.sample app build template
|
github-assets-uploader -f authorizer-${VERSION}-windows-amd64.zip -mediatype application/zip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \
|
||||||
|
github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \
|
||||||
|
|
||||||
|
# - uses: wangyoucao577/go-release-action@v1.20
|
||||||
|
# with:
|
||||||
|
# github_token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
# goos: ${{ matrix.goos }}
|
||||||
|
# goarch: ${{ matrix.goarch }}
|
||||||
|
# build_command: make clean && make
|
||||||
|
# md5sum: FALSE
|
||||||
|
# extra_files: .env.sample app build template
|
||||||
|
Reference in New Issue
Block a user