name: release on: push: tags: - "*.*.*" jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v3 with: go-version: 1.20.x - name: Build linux run: make linux - name: Build macos run: make macos - name: Test run: make test - name: Lint run: make lint - name: Zip macos run: zip -r reflector_darwin_amd64.zip ./dist/darwin_amd64 - name: Zip linux run: zip -r reflector_linux_amd64.zip ./dist/linux_amd64 - name: retrieve all tags run: git fetch --prune --unshallow --tags - name: Generate Changelog run: git log $(git describe --tags --abbrev=0 @^)..@ --no-merges --oneline > ${{ github.workspace }}-CHANGELOG.txt - name: upload to github releases uses: softprops/action-gh-release@v1 with: files: | ./reflector_linux_amd64.zip ./reflector_darwin_amd64.zip body_path: ${{ github.workspace }}-CHANGELOG.txt # - name: Login to DockerHub # uses: docker/login-action@v2 # with: # username: ${{ secrets.DOCKERHUB_USERNAME }} # password: ${{ secrets.DOCKERHUB_TOKEN }} # - name: Generate docker image # run: make image # - name: Docker push # run: make publish_image