chore(release): 0.12.0 #31
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*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up git | |
uses: actions/checkout@v3 | |
- name: Setup builder | |
run: make builder.build | |
- name: Build package | |
run: | | |
make package.build.container | |
- name: Save package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: package | |
path: dist | |
retention-days: 1 | |
dist_image: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Get package | |
uses: actions/download-artifact@v3 | |
with: | |
name: package | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Extract package | |
run: | | |
tar xvf exposrd-*.tgz --strip-components=1 | |
mkdir -p dist | |
mv exposrd-*.tgz dist/ | |
- name: Login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish versioned container to ghcr.io | |
run: | | |
make publish=true registry=ghcr.io/exposr image.xbuild | |
- name: Publish latest container to ghcr.io | |
run: | | |
make registry=ghcr.io/exposr image.xbuild.latest | |
- name: Login to docker.io | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
- name: Publish versioned container to docker.io | |
run: | | |
make registry=docker.io/exposr publish=true image.xbuild | |
- name: Publish latest container to docker.io | |
run: | | |
make registry=docker.io/exposr image.xbuild.latest | |
- name: Publish compatibility images to docker.io | |
run: | | |
docker buildx imagetools create --tag docker.io/exposr/exposr-server:$(make get.version) docker.io/exposr/exposrd:$(make get.version) | |
docker buildx imagetools create --tag docker.io/exposr/exposr-server:latest docker.io/exposr/exposr-server:$(make get.version) | |
release: | |
runs-on: ubuntu-latest | |
needs: [dist_image] | |
steps: | |
- name: Package artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: package | |
- name: Generate SHA256 sums for artifacts | |
run: | | |
ls exposrd-* | xargs -L 1 -I {} sh -c "sha256sum {} > {}.sha256" | |
- name: Build artifacts | |
run: | | |
ls | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: ${{ startsWith(github.ref, '/refs/tags/v0') }} | |
files: | | |
exposrd-* |