Compare commits

..

3 Commits

Author SHA1 Message Date
Lakhan Samani
3ed5426467 chore: fix env for release 2021-10-28 07:46:56 +05:30
Lakhan Samani
29251c8c20 fix: use inbuilt actions 2021-10-28 07:41:49 +05:30
Lakhan Samani
08b1f97ccb chore: fix docker build 2021-10-28 07:17:44 +05:30
2 changed files with 28 additions and 38 deletions

View File

@@ -5,29 +5,26 @@ on:
jobs: jobs:
releases: releases:
name: Release Authorizer Binary name: Release Authorizer Binary
runs-on: ubuntu-latest strategy:
matrix:
go-version: [1.16.4]
platform: [ubuntu-18.04]
runs-on: ${{ matrix.platform }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install dependencies - name: Install Go
run: | uses: actions/setup-go@v2
sudo apt-get install build-essential wget zip gcc-mingw-w64 && \ with:
sudo apt-get remove --auto-remove golang-go && \ go-version: ${{ matrix.go-version }}
sudo rm -rf /usr/bin/go &&\ # - name: Install dependencies
wget --progress=dot:mega https://golang.org/dl/go1.17.1.linux-amd64.tar.gz -O go-linux.tar.gz && \ # run: |
sudo tar -zxf go-linux.tar.gz && \ # sudo apt-get install build-essential wget zip && \
sudo mv go /usr/bin/ && \ # go version && \
sudo mkdir -p /go/bin /go/src /go/pkg && \ # 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 && \
export GO_HOME=/usr/bin/go && \ # tar -zxf github-assets-uploader.tar.gz && \
export GOPATH=/go && \ # sudo mv github-assets-uploader /usr/sbin/ && \
export PATH=${GOPATH}/bin:${GO_HOME}/bin/:$PATH && \ # sudo rm -f github-assets-uploader.tar.gz && \
echo "/usr/bin/go/bin" >> $GITHUB_PATH # github-assets-uploader -version
echo "/usr/bin/x86_64-w64-mingw32-gcc" >> 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 - name: Print Go paths
run: whereis go run: whereis go
- name: Print Go Version - name: Print Go Version
@@ -47,9 +44,15 @@ jobs:
make clean && \ make clean && \
CGO_ENABLED=1 make && \ CGO_ENABLED=1 make && \
tar cvfz authorizer-${VERSION}-linux-amd64.tar.gz .env app/build build templates tar cvfz authorizer-${VERSION}-linux-amd64.tar.gz .env app/build build templates
- name: Upload assets - name: Upload asset
run: | uses: softprops/action-gh-release@v1
github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} with:
files: authorizer-${VERSION}-linux-amd64.tar.gz
token: ${{secrets.RELEASE_TOKEN}}
tag_name: ${VERSION}
# - name: Upload assets
# run: |
# github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION}
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:

View File

@@ -95,13 +95,12 @@ binaries are baked with required deployment files and bundled. You can download
- Mac OSX - Mac OSX
- Linux - Linux
- Windows
### Step 1: Download and unzip bundle ### Step 1: Download and unzip bundle
- Download the Bundle for the specific OS from the [release page](https://github.com/authorizerdev/authorizer/releases) - Download the Bundle for the specific OS from the [release page](https://github.com/authorizerdev/authorizer/releases)
> Note: For windows, it includes `.zip` file. For Linux & MacOS, it includes `.tar.gz` file. > Note: For windows, we recommend running using docker image to run authorizer.
- Unzip using following command - Unzip using following command
@@ -111,12 +110,6 @@ binaries are baked with required deployment files and bundled. You can download
tar -zxf AUTHORIZER_VERSION -c authorizer tar -zxf AUTHORIZER_VERSION -c authorizer
``` ```
- Windows
```sh
unzip AUTHORIZER_VERSION
```
- Change directory to `authorizer` - Change directory to `authorizer`
```sh ```sh
@@ -137,12 +130,6 @@ Required environment variables are pre-configured in `.env` file. But based on t
./build/server ./build/server
``` ```
- For windows
```sh
./build/server.exe
```
> Note: For mac users, you might have to give binary the permission to execute. Here is the command you can use to grant permission `xattr -d com.apple.quarantine build/server` > Note: For mac users, you might have to give binary the permission to execute. Here is the command you can use to grant permission `xattr -d com.apple.quarantine build/server`
## Install instance on Heroku ## Install instance on Heroku