fix: mono #333
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: Goreleaser | |
on: | |
push: | |
tags: | |
- "*" # triggers only if push new tag version, like `0.8.4` or else | |
permissions: | |
contents: write | |
id-token: write | |
packages: write | |
jobs: | |
release: | |
name: GoReleaser release | |
runs-on: ubuntu-22.04 | |
env: | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
id: go | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: sigstore/[email protected] | |
- uses: anchore/sbom-action/[email protected] | |
- uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
- uses: cachix/install-nix-action@v30 | |
with: | |
github_access_token: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.x' | |
- name: Checkout chocolatey/choco 📥 | |
uses: actions/[email protected] | |
with: | |
repository: chocolatey/choco | |
path: ${{ github.workspace }}/dialogflow-cx-cli/choco | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Chocolatey 🍫📦 | |
run: | | |
chmod +x *.sh | |
# prevent choco build to calculate version from tag of main repository | |
unset GITHUB_REF GITHUB_BASE_REF GITHUB_HEAD_REF | |
./build.sh --configuration=ReleaseOfficial | |
cp docker/choco_wrapper code_drop/temp/_PublishedApps/choco/choco_wrapper | |
cp -r ./code_drop/temp/_PublishedApps/choco/ /opt/chocolatey | |
mkdir /opt/chocolatey/lib | |
cp /opt/chocolatey/choco_wrapper /usr/local/bin/choco | |
cp /opt/chocolatey/choco_wrapper /usr/local/bin/choco.exe | |
working-directory: ${{ github.workspace }}/dialogflow-cx-cli/choco | |
- name: setup-snapcraft | |
run: | | |
sudo apt-get update || true | |
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft | |
mkdir -p $HOME/.cache/snapcraft/download | |
mkdir -p $HOME/.cache/snapcraft/stage-packages | |
- name: snapcraft-login | |
run: | | |
export SNAPCRAFT_STORE_CREDENTIALS=$(echo "${{ secrets.SNAPCRAFT_LOGIN }}") snapcraft login | |
snapcraft whoami | |
- name: Write signing key to disk | |
run: 'echo "$KEY" > cosign.key' | |
shell: bash | |
env: | |
KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | |
- name: dockerhub-login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: ghcr-login | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@master | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} | |
COSIGN_PWD: ${{ secrets.COSIGN_PWD }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }} | |
AUR_KEY: ${{ secrets.AUR_KEY }} | |
FURY_TOKEN: ${{ secrets.FURY_TOKEN }} | |
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} | |
MASTODON_CLIENT_ID: ${{ secrets.MASTODON_CLIENT_ID }} | |
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }} | |
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} |