diff --git a/.github/workflows/build-binary.yaml b/.github/workflows/build-binary.yaml new file mode 100644 index 0000000000..b03c517155 --- /dev/null +++ b/.github/workflows/build-binary.yaml @@ -0,0 +1,27 @@ +name: Build Binary + +on: + release: + types: + - published + workflow_dispatch: + inputs: {} + +jobs: + refresh: + name: build-binary + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build + run: make binary + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: music + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml deleted file mode 100644 index b3dbc970d0..0000000000 --- a/.github/workflows/image.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: build-image - -on: - push: - branches: [ master ] - -jobs: - refresh: - name: build-image - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Run - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - make image diff --git a/.gitignore b/.gitignore index 2d1bca0e16..65d7ae6aa4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ account.json config.yaml +music diff --git a/Makefile b/Makefile index 2176d2488f..1f96bfb914 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,2 @@ -TAG=$(shell git rev-parse HEAD) - -ifndef DOCKER_USERNAME -$(error DOCKER_USERNAME is not set) -endif -ifndef DOCKER_PASSWORD -$(error DOCKER_PASSWORD is not set) -endif - -docker-login: - docker login -u $(DOCKER_USERNAME) -p $(DOCKER_PASSWORD) - -image: docker-login - docker build . -t charlieegan3/music:$(TAG) -t charlieegan3/music:latest - docker push charlieegan3/music:$(TAG) - docker push charlieegan3/music:latest +binary: + go build