Skip to content

Merge branch 'main' of github.com:ruedigerp/cloudflare-dns-manager #10

Merge branch 'main' of github.com:ruedigerp/cloudflare-dns-manager

Merge branch 'main' of github.com:ruedigerp/cloudflare-dns-manager #10

Workflow file for this run

name: Build, Package, Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: "1.21"
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.MO_CLI_TOKEN }}
- name: Create Sematic Release Version
run: |
git config --global user.email "[email protected]"
git config --global user.name "dns-manager"
git config --global credential.helper cache
npx standard-version
git push --follow-tags origin main
- name: Get the current version
id: get_version
run: echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Create release in another repo
run: |
echo "Creating release ${VERSION}"
gh release create refs/tags/${VERSION} --title "Release ${VERSION}" --repo ruedigerp/cloudflare-dns-manager-homebrew
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}
- name: Execute make all
run: make all
- name: Package artefacts
run: |
for file in builds/*; do
tar -czvf builds/$(basename "$file").tar.gz -C builds $(basename "$file")
done
ls -lisa builds
- name: Upload tarballs/executable
run: |
ls -lisa builds
for tarball in builds/*.tar.gz; do
echo "Tarball: $tarball"
gh release upload "${{ env.VERSION }}" "$tarball" --repo ruedigerp/cloudflare-dns-manager-homebrew
done
gh release upload "${{ env.VERSION }}" "builds/dns-manager-${{ env.VERSION }}-windows-amd64" --repo ruedigerp/cloudflare-dns-manager-homebrew
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}
- name: UPDATE BREW / SCOOP
run: |
./release.sh
git config --global user.email "[email protected]"
git config --global user.name "dns-manager"
git config --global credential.helper cache
git clone https://${{secrets.MO_CLI_TOKEN}}@github.com/ruedigerp/cloudflare-dns-manager-homebrew
cd cloudflare-dns-manager-homebrew
cp ../dns-manager.rb .
cp ../dns-manager.json .
cp ../CHANGELOG.md .
git add .
git commit -m " ${{ env.VERSION }}"
git push
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}