Skip to content

Commit 3d74c0c

Browse files
committed
add tagging, rename
1 parent 62213cf commit 3d74c0c

File tree

12 files changed

+61
-42
lines changed

12 files changed

+61
-42
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,30 @@
1111
#
1212
name: release
1313
on:
14-
push:
15-
tags:
16-
- 'v*'
14+
workflow_run:
15+
workflows: ["Bump Git Version"]
16+
branches: [main]
17+
types:
18+
- completed
1719
permissions:
1820
contents: write
1921
jobs:
2022
goreleaser:
2123
runs-on: ubuntu-latest
2224
steps:
23-
-
24-
name: Checkout
25+
- name: Checkout
2526
uses: actions/checkout@v3
26-
-
27-
name: Unshallow
27+
- name: Unshallow
2828
run: git fetch --prune --unshallow
29-
-
30-
name: Set up Go
29+
- name: Set up Go
3130
uses: actions/setup-go@v3
32-
with:
33-
go-version-file: 'go.mod'
34-
cache: true
35-
-
36-
name: Import GPG key
31+
- name: Import GPG key
3732
uses: crazy-max/ghaction-import-gpg@v5
3833
id: import_gpg
3934
with:
4035
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
4136
passphrase: ${{ secrets.PASSPHRASE }}
42-
-
43-
name: Run GoReleaser
37+
- name: Run GoReleaser
4438
uses: goreleaser/goreleaser-action@v3.2.0
4539
with:
4640
version: latest
@@ -49,3 +43,5 @@ jobs:
4943
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
5044
# GitHub sets this automatically
5145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
- name: GoReportCard
47+
uses: creekorful/goreportcard-action@v1.0

.github/workflows/tag.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Bump Git Version
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
semver:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
tag: ${{ steps.tagging.outputs.new_tag }}
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: '0'
15+
- name: Bump version and push tag
16+
uses: anothrNick/github-tag-action@1.61.0
17+
id: tagging
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
WITH_V: true
21+
RELEASE_BRANCHES: main

.github/workflows/test.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828

2929
- name: Set up Go
3030
uses: actions/setup-go@v3
31-
with:
32-
go-version-file: 'go.mod'
33-
cache: true
3431
id: go
3532

3633
- name: Get dependencies
@@ -46,9 +43,6 @@ jobs:
4643
steps:
4744
- uses: actions/checkout@v3
4845
- uses: actions/setup-go@v3
49-
with:
50-
go-version-file: 'go.mod'
51-
cache: true
5246
- run: go generate ./...
5347
- name: git diff
5448
run: |
@@ -81,9 +75,6 @@ jobs:
8175

8276
- name: Set up Go
8377
uses: actions/setup-go@v3
84-
with:
85-
go-version-file: 'go.mod'
86-
cache: true
8778
id: go
8879

8980
- uses: hashicorp/setup-terraform@v2
@@ -94,7 +85,7 @@ jobs:
9485
- name: Get dependencies
9586
run: |
9687
go mod download
97-
88+
9889
- name: TF acceptance tests
9990
timeout-minutes: 10
10091
env:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEST?=$$(go list ./... | grep -v 'vendor')
22
HOSTNAME=github.com
3-
NAMESPACE=nwheeler-splunk
3+
NAMESPACE=circa10a
44
NAME=mailform
55
BINARY=terraform-provider-${NAME}
66
VERSION=0.1

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# Terraform Provider Mailform
1+
# terraform-provider-mailform <img src="https://i.imgur.com/fAS7XqO.png" height="5%" width="5%" align="left"/>
22

33
This provider enables you to send physical mail, driven by terraform, via https://mailform.io
44

55
Standing on the shoulders of giants enables us to yeet mail further.
66

7+
![Build Status](https://github.com/circa10a/terraform-provider-mailform/workflows/release/badge.svg)
8+
[![Go Report Card](https://goreportcard.com/badge/github.com/circa10a/terraform-provider-mailform)](https://goreportcard.com/report/github.com/circa10a/terraform-provider-mailform)
9+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/circa10a/terraform-provider-mailform?style=plastic)
10+
[![Buy Me A Coffee](https://img.shields.io/badge/BuyMeACoffee-Donate-ff813f.svg?logo=CoffeeScript&style=plastic)](https://www.buymeacoffee.com/caleblemoine)
11+
712
> :warning: Orders cannot be updated/deleted (cancelled). Once created,no more modifications can be made due to API limitations. Deleted resources are simply removed from state.
813
914
## Usage
@@ -14,7 +19,7 @@ The provide with use the environment variable `MAILFORM_API_TOKEN` by default un
1419
terraform {
1520
required_providers {
1621
mailform = {
17-
source = "github.com/nwheeler-splunk/mailform"
22+
source = "github.com/circa10a/terraform-provider-mailform"
1823
}
1924
}
2025
}
@@ -23,12 +28,14 @@ provider "mailform" {
2328
api_token = "XXX" // If not specified, will read MAILFORM_API_TOKEN env var
2429
}
2530
31+
// Create PDF
2632
resource "mailform_pdf" "example" {
2733
header = "My Resumes"
2834
content = "Some resume contents"
2935
filename = "./test.pdf"
3036
}
3137
38+
// Create mail order
3239
resource "mailform_order" "example" {
3340
pdf_file = mailform_pdf.example.filename
3441
service = "USPS_PRIORITY"
@@ -45,6 +52,15 @@ resource "mailform_order" "example" {
4552
from_postcode = "00000"
4653
from_country = "US"
4754
}
55+
56+
// Fetch order data
57+
data "mailform_order" "example" {
58+
id = mailform_order.example.id
59+
}
60+
61+
output "order_info" {
62+
value = data.mailform_order.example
63+
}
4864
```
4965

5066
## Requirements

docs/data-sources/order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Order data source in the Terraform provider mailform.
1616
terraform {
1717
required_providers {
1818
mailform = {
19-
source = "github.com/nwheeler-splunk/mailform"
19+
source = "github.com/circa10a/terraform-provider-mailform"
2020
}
2121
}
2222
}

examples/data-sources/mailform_order/data-source.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
terraform {
22
required_providers {
33
mailform = {
4-
source = "github.com/nwheeler-splunk/mailform"
4+
source = "github.com/circa10a/terraform-provider-mailform"
55
}
66
}
77
}

examples/resources/mailform_order/order.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
terraform {
22
required_providers {
33
mailform = {
4-
source = "github.com/nwheeler-splunk/mailform"
4+
source = "github.com/circa10a/terraform-provider-mailform"
55
}
66
}
77
}
88

99
resource "mailform_pdf" "example" {
10-
header = "My Resumes"
10+
header = "My Resume"
1111
content = "Some resume contents"
1212
filename = "./test.pdf"
1313
}

examples/resources/mailform_pdf/pdf.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
terraform {
22
required_providers {
33
mailform = {
4-
source = "github.com/nwheeler-splunk/mailform"
4+
source = "github.com/circa10a/terraform-provider-mailform"
55
}
66
}
77
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/nwheeler-splunk/terraform-provider-mailform
1+
module github.com/circa10a/terraform-provider-mailform
22

33
go 1.18
44

0 commit comments

Comments
 (0)