Skip to content

Commit

Permalink
Merge pull request #171 from keratin/release-fixes
Browse files Browse the repository at this point in the history
fixes for the release process
  • Loading branch information
cainlevy authored Mar 23, 2021
2 parents 8165a27 + 1371a2c commit bd37f1c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 38 deletions.
41 changes: 15 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,18 @@ jobs:
- name: compile
run: |
go build \
-ldflags '-extldflags -static -X main.VERSION=${VERSION##*/v}' \
-ldflags "-extldflags -static -X main.VERSION=${VERSION##*/v}" \
-o dist/authn-linux64
env:
VERSION: ${{ github.ref }}
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 1

- name: compress
run: |
bzip2 -c dist/authn-linux64 > dist/authn-linux64.bz2
- uses: actions/upload-artifact@v2
with:
name: authn-linux64.bz2
path: dist/authn-linux64.bz2
name: authn-linux64
path: dist/authn-linux64

windows64:
name: Compile for Windows
Expand All @@ -52,7 +48,7 @@ jobs:
- name: compile
run: |
go build \
-ldflags '-X main.VERSION=${VERSION##*/v}' \
-ldflags "-X main.VERSION=${VERSION##*/v}" \
-o dist/authn-windows64.exe
env:
VERSION: ${{ github.ref }}
Expand Down Expand Up @@ -88,14 +84,10 @@ jobs:
GOARCH: amd64
CGO_ENABLED: 1

- name: compress
run: |
bzip2 -c dist/authn-macos64 > dist/authn-macos64.bz2
- uses: actions/upload-artifact@v2
with:
name: authn-macos64.bz2
path: dist/authn-macos64.bz2
name: authn-macos64
path: dist/authn-macos64

release:
name: Create Release
Expand All @@ -122,9 +114,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./authn-linux64.bz2/authn-linux64.bz2
asset_name: authn-linux64.bz2
asset_content_type: application/x-bzip2
asset_path: ./authn-linux64/authn-linux64
asset_name: authn-linux64
asset_content_type: application/octet-stream

- name: Upload Windows64
uses: actions/upload-release-asset@v1
Expand All @@ -142,9 +134,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./authn-macos64.bz2/authn-macos64.bz2
asset_name: authn-macos64.bz2
asset_content_type: application/x-bzip2
asset_path: ./authn-macos64/authn-macos64
asset_name: authn-macos64
asset_content_type: application/octet-stream

register:
name: Register on Docker Hub
Expand All @@ -156,13 +148,10 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: authn-linux64.bz2
name: authn-linux64

- name: Uncompress
run: |
bzip2 -d authn-linux64.bz2
mkdir dist
mv authn-linux64 dist
- run: |
chmod a+x authn-linux64
- name: VERSION
id: version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine
RUN apk add --no-cache ca-certificates

WORKDIR /app
ADD dist/authn-linux64 /app/authn
ADD authn-linux64 /app/authn

EXPOSE 3000
ENV PORT 3000
Expand Down
11 changes: 0 additions & 11 deletions Dockerfile.linux

This file was deleted.

0 comments on commit bd37f1c

Please sign in to comment.