diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a2786ef --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +# .github/workflows/release.yml +name: goreleaser + +on: + push: + # run only against tags + tags: + - "*" + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + # More assembly might be required: Docker logins, GPG, etc. + # It all depends on your needs. + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/README.md b/README.md index ae434c4..479722c 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ DDNS_SERVER_API_KEY=createatoken ddns server Using docker: ``` -docker run -e DDNS_SERVER_API_KEY=createatoken ddns server +docker run -e DDNS_SERVER_API_KEY=createatoken ghcr.io/tnyeanderson/ddns server ``` ### Agent setup @@ -95,7 +95,7 @@ DDNS_API_SERVER=ddns.myserver.site DDNS_API_KEY=createatoken ddns update yourdom Using docker: ``` -docker run -e DDNS_API_SERVER=ddns.myserver.site -e DDNS_API_KEY=createatoken ddns update yourdomain.site 1.2.3.4 +docker run -e DDNS_API_SERVER=ddns.myserver.site -e DDNS_API_KEY=createatoken ghcr.io/tnyeanderson/ddns update yourdomain.site 1.2.3.4 ``` > NOTE: To update the IP address to the public IP of the box making the diff --git a/cmd/root.go b/cmd/root.go index 7ddf075..1ccca2e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -9,7 +9,7 @@ import ( // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Version: "v0.0.2", + Version: "v0.0.3", Use: "ddns", Short: "A simple DDNS server and client", Long: fmt.Sprintf(`A simple DDNS server and client.