Skip to content

Release 2.12.12

Release 2.12.12 #328

Workflow file for this run

---
name: Release
on:
push:
branches:
- master
tags:
- '*'
env:
GO_VERSION: '>=1.21.5'
GORELEASER_VERSION: v0.146.0
jobs:
create-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Mage
run: |
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go
- name: Setup GoReleaser
run: |
curl -O -L https://github.com/goreleaser/goreleaser/releases/download/${{ env.GORELEASER_VERSION }}/goreleaser_amd64.deb
sudo dpkg -i goreleaser_amd64.deb
rm goreleaser_amd64.deb
- name: Set GoReleaser flags
id: set-goreleaser-flags
run: |
if ${{ startsWith(github.ref, 'refs/tags') }} ; then
echo "::set-output name=GORELEASER_FLAGS::--rm-dist --skip-validate"
else
echo "::set-output name=GORELEASER_FLAGS::--rm-dist --snapshot --skip-publish --skip-validate"
fi
- name: Build packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goreleaser release ${{ steps.set-goreleaser-flags.outputs.GORELEASER_FLAGS }}
- name: Upload packages artifacts
uses: actions/upload-artifact@v2
with:
name: packages
path: dist
publish-s3:
needs: create-packages
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Mage
run: |
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go
- name: Download packages artifacts
uses: actions/download-artifact@v2
with:
name: packages
path: dist
- name: Publish packages to RWS
env:
RWS_URL_PART: https://rws.tarantool.org/release/modules
RWS_AUTH: ${{ secrets.RWS_AUTH }}
run: mage publishRWS