release #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.x | |
- name: update apt cache | |
run: sudo apt-get update | |
- name: Install libvips | |
run: sudo apt-get install -y libvips libvips-dev | |
- 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 mirage_darwin_amd64.zip ./dist/darwin_amd64 | |
- name: Zip linux | |
run: zip -r mirage_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@v2 | |
with: | |
files: | | |
./mirage_linux_amd64.zip | |
# ./mirage_darwin_amd64.zip | |
body_path: ${{ github.workspace }}-CHANGELOG.txt | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Generate docker image | |
run: make image | |
- name: Docker push | |
run: make publish_image |