Skip to content

Commit

Permalink
Add docs and release config
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Sep 11, 2020
1 parent f100c40 commit 3d46ffc
Show file tree
Hide file tree
Showing 11 changed files with 522 additions and 44 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: goreleaser

on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.15'
-
name: Import GPG key
id: import_gpg
uses: paultyng/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 8 additions & 27 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.

before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- freebsd
- openbsd
- solaris
- windows
- linux
- darwin
Expand All @@ -22,20 +19,6 @@ builds:
ignore:
- goos: darwin
goarch: '386'
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: openbsd
goarch: arm
- goos: openbsd
goarch: arm64
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64
- goos: solaris
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
Expand All @@ -46,14 +29,12 @@ checksum:
signs:
- artifacts: checksum
args:
- "--batch"
- "--local-user"
- "51852D87348FFC4C" # Replace this with your GPG signing key ID
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
# Visit your project's GitHub Releases page to publish this release.
draft: true
changelog:
skip: true
21 changes: 21 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
page_title: "twitter Provider"
subcategory: ""
description: |-
---

# twitter Provider





## Schema

### Optional

- **access_token** (String, Optional)
- **access_token_secret** (String, Optional)
- **consumer_api_key** (String, Optional)
- **consumer_api_secret** (String, Optional)
30 changes: 30 additions & 0 deletions docs/resources/block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
page_title: "twitter_block Resource - terraform-provider-twitter"
subcategory: ""
description: |-
---

# Resource `twitter_block`



## Example Usage

```terraform
resource "twitter_block" "blocks" {
screen_name = "ptyng"
}
```

## Schema

### Required

- **screen_name** (String, Required) The screen name of the potentially blocked user.

### Optional

- **id** (String, Optional) The ID of this resource.


45 changes: 45 additions & 0 deletions docs/resources/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
page_title: "twitter_list Resource - terraform-provider-twitter"
subcategory: ""
description: |-
---

# Resource `twitter_list`



## Example Usage

```terraform
resource "twitter_list" "hashicorp" {
name = "HashiCorp Employees"
mode = "public"
description = "List of people publicly identifying as HashiCorp employees."
members = [
"ptyng",
]
}
```

## Schema

### Required

- **name** (String, Required) The name for the list. A list's name must start with a letter and can consist only of 25 or fewer letters, numbers, "-", or "_" characters.

### Optional

- **description** (String, Optional) The description to give the list.
- **id** (String, Optional) The ID of this resource.
- **members** (Set of String, Optional) The screen names of the user for whom to return results.
- **mode** (String, Optional) Whether your list is public or private. Values can be `public` or `private`.

### Read-only

- **slug** (String, Read-only)
- **uri** (String, Read-only)


24 changes: 24 additions & 0 deletions docs/resources/mute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
page_title: "twitter_mute Resource - terraform-provider-twitter"
subcategory: ""
description: |-
---

# Resource `twitter_mute`





## Schema

### Required

- **screen_name** (String, Required) The screen name of the potentially muteed user.

### Optional

- **id** (String, Optional) The ID of this resource.


3 changes: 3 additions & 0 deletions examples/resources/twitter_block/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "twitter_block" "blocks" {
screen_name = "ptyng"
}
10 changes: 10 additions & 0 deletions examples/resources/twitter_list/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "twitter_list" "hashicorp" {
name = "HashiCorp Employees"
mode = "public"

description = "List of people publicly identifying as HashiCorp employees."

members = [
"ptyng",
]
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ require (
github.com/dghubble/oauth1 v0.6.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-retryablehttp v0.6.6
github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.0-rc.1.0.20200507004823-7d4190ae1797
github.com/hashicorp/terraform-plugin-docs v0.1.4
github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.1
github.com/paultyng/go-batcher v0.1.0
// fork of github.com/dghubble/go-twitter, adding mutes, blocks, etc
github.com/paultyng/go-twitter v0.0.0-20200517003436-2f8284a959fe
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f // indirect
)
Loading

0 comments on commit 3d46ffc

Please sign in to comment.