chmod +x the binary and gzip it #10
This file contains hidden or 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: run build script | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| run-script: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v2 | |
| - name: Run Bash Script | |
| run: ./build.sh | |
| - name: Create Tag | |
| run: | | |
| go_latest_version=$(curl -s https://go.dev/VERSION?m=text | head -n 1) | |
| caddy_latest_version=$(curl -s https://api.github.com/repos/caddyserver/caddy/releases/latest | jq -r '.tag_name') | |
| caddy_azure_plugin_latest_version=$(curl -s https://api.github.com/repos/caddy-dns/azure/releases/latest | jq -r '.tag_name') | |
| tag_name="${go_latest_version}-caddy_${caddy_latest_version}-caddy_dns_azure_plugin_${caddy_azure_plugin_latest_version}" | |
| git config --local user.email "taggerbot@empty.empty" | |
| git config --local user.name "taggerbot from github action" | |
| git tag $tag_name | |
| git push origin $tag_name | |
| echo "TAG_NAME=$tag_name" >> $GITHUB_ENV | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ env.TAG_NAME }} | |
| files: | | |
| caddy | |