Skip to content

fix: change to please-release #15

fix: change to please-release

fix: change to please-release #15

Workflow file for this run

name: Build, Package, Release [dev]
on:
push:
branches:
- develop
permissions:
contents: write
pull-requests: write
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 "ruedigerp"
# git config --global credential.helper cache
# npx standard-version --prerelease dev
# git push --follow-tags origin delevop
- name: release-please
uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.MO_CLI_TOKEN }}
release-type: simple
target-branch: ${{ github.ref_name }}
- name: Fetch latest tags
run: git fetch --tags
- name: Get latest version tag
id: get_tag
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# - name: Debug Outputs
# run: |
# echo "Outputs: ${{ toJson(steps.release.outputs) }}"
# - 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 ${tag}"
gh release create refs/tags/${tag} --title "Release ${tag}" --repo ruedigerp/homebrew-dns-manager
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}
- name: Execute make all
run: make -f Makefile-dev 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/executables
run: |
ls -lisa builds
for tarball in builds/*.tar.gz; do
gh release upload "${tag}" "$tarball" --repo ruedigerp/homebrew-dns-manager-dev
done
gh release upload "${tag}" "builds/dns-manager-dev-${tag}-windows-amd64" --repo ruedigerp/homebrew-dns-manager-dev
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}
- name: Update Homebrew & Scoop
run: |
./release-dev.sh
git config --global user.email "[email protected]"
git config --global user.name "ruedigerp"
git config --global credential.helper cache
git clone https://${{secrets.MO_CLI_TOKEN}}@github.com/ruedigerp/homebrew-dns-manager-dev
cd homebrew-dns-manager-dev
cp ../dns-manager-dev.rb .
cp ../dns-manager-dev.json .
cp ../CHANGELOG.md .
git add .
git commit -m " ${tag}"
git push
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}