kind: pipeline name: default workspace: base: /go path: src/gitbase.de/apairon/mark2web steps: - name: build for linux image: golang:latest environment: CGO_ENABLED: 0 GOOS: linux GOARCH: amd64 commands: - git submodule update --init --recursive - git fetch --tags - ./build.sh - name: test with example content image: alpine commands: - ./dist/mark2web-`cat VERSION`-linux-amd64 -version - ./dist/mark2web-`cat VERSION`-linux-amd64 -in example -out example_out -create -logLevel debug - name: build for freebsd image: golang:latest environment: CGO_ENABLED: 0 GOOS: freebsd GOARCH: amd64 commands: - ./build.sh when: event: [ tag ] - name: build for macos image: golang:latest environment: CGO_ENABLED: 0 GOOS: darwin GOARCH: amd64 commands: - ./build.sh when: event: [ tag ] - name: build for windows image: golang:latest environment: CGO_ENABLED: 0 GOOS: windows GOARCH: amd64 FILEEXT: .exe commands: - ./build.sh when: event: [ tag ] - name: build docker image image: docker commands: - cp dist/mark2web-`cat VERSION`-linux-amd64 mark2web - docker build -t apairon/mark2web . volumes: - name: docker path: /var/run/docker.sock when: branch: [ master ] event: [ push ] - name: deploy website image: apairon/mark2web:latest pull: never commands: - /mark2web -version - /mark2web -in website -out html -create -logLevel debug when: branch: [ master ] event: [ push ] - name: prepare release image: apairon/mark2web:latest pull: never commands: - gzip dist/* - ls -la dist/ when: event: [ tag ] - name: gitea release image: plugins/gitea-release settings: api_key: from_secret: gitea_token base_url: https://gitbase.de files: - dist/* title: VERSION note: RELEASE.md checksum: - md5 - sha256 when: event: [ tag ] volumes: - name: docker host: path: /var/run/docker.sock