Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: publishing setup #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

7 changes: 2 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# TODO: Dependabot only updates hashicorp GHAs in the template repository, the following lines can be removed for consumers of this template
allow:
- dependency-name: "hashicorp/*"
interval: "weekly"
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.4
- name: Import GPG Key
id: import_gpg
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

5 changes: 3 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
version: 2
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
Expand Down Expand Up @@ -41,7 +42,7 @@ checksum:
signs:
- artifacts: checksum
args:
# if you are using this in a GitHub action or some other automated pipeline, you
# if you are using this in a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
Expand All @@ -57,4 +58,4 @@ release:
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true
disable: true
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Copyright (c) 2021 HashiCorp, Inc.

Mozilla Public License Version 2.0
==================================

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/group.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_group Data Source - coderd"
page_title: "coderd_group Data Source - terraform-provider-coderd"
subcategory: ""
description: |-
An existing group on the coder deployment.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_organization Data Source - coderd"
page_title: "coderd_organization Data Source - terraform-provider-coderd"
subcategory: ""
description: |-
An existing organization on the coder deployment.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_template Data Source - coderd"
page_title: "coderd_template Data Source - terraform-provider-coderd"
subcategory: ""
description: |-
An existing template on the Coder deployment.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/user.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_user Data Source - coderd"
page_title: "coderd_user Data Source - terraform-provider-coderd"
subcategory: ""
description: |-
An existing user on the coder deployment
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/group.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_group Resource - coderd"
page_title: "coderd_group Resource - terraform-provider-coderd"
subcategory: ""
description: |-
A group on the Coder deployment. If you want to have a group resource with unmanaged members, but still want to read the members in Terraform, use the data.coderd_group data source.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_template Resource - coderd"
page_title: "coderd_template Resource - terraform-provider-coderd"
subcategory: ""
description: |-
A Coder template
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/user.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_user Resource - coderd"
page_title: "coderd_user Resource - terraform-provider-coderd"
subcategory: ""
description: |-
A user on the Coder deployment.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/workspace_proxy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_workspace_proxy Resource - coderd"
page_title: "coderd_workspace_proxy Resource - terraform-provider-coderd"
subcategory: ""
description: |-
A Workspace Proxy for the Coder deployment.
Expand Down
3 changes: 0 additions & 3 deletions internal/provider/group_resource.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package provider

import (
Expand Down
3 changes: 0 additions & 3 deletions internal/provider/group_resource_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package provider

import (
Expand Down
3 changes: 0 additions & 3 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package provider

import (
Expand Down
10 changes: 2 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand All @@ -20,7 +17,7 @@ import (

// Run the docs generation tool, check its repository for more information on how it works and how docs
// can be customized.
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate -provider-name coderd
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

var (
// these will be set by the goreleaser configuration
Expand All @@ -38,10 +35,7 @@ func main() {
flag.Parse()

opts := providerserver.ServeOpts{
// TODO: Update this string with the published name of your provider.
// Also update the tfplugindocs generate command to either remove the
// -provider-name flag or set its value to the updated provider name.
Address: "registry.terraform.io/hashicorp/scaffolding",
Address: "registry.terraform.io/coder/coderd",
Debug: debug,
}

Expand Down
3 changes: 0 additions & 3 deletions tools/tools.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

//go:build tools

package tools
Expand Down
Loading