Skip to content

removing shorthand for ignore-password-policy flag #19

removing shorthand for ignore-password-policy flag

removing shorthand for ignore-password-policy flag #19

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Test
run: go test -v .
release:
needs: test
runs-on: ubuntu-latest
steps:
- name: Setting Xipher Version
run: echo "XIPHER_VERSION=${GITHUB_REF_NAME:1}" >> $GITHUB_ENV
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_SSH_KEY: ${{ secrets.HOMEBREW_SSH_KEY }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
${{ github.repository }}:latest
${{ github.repository }}:${{ env.XIPHER_VERSION }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ env.XIPHER_VERSION }}