-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π¨ Automate feed generation π¨ Fix artifacts filenames π¨ Fix release not happening π¨ Fix release file name π¨ Fix release configuration π¨ Fix exclude files regex in release Create go.yml Create release.yml π¨ Fix curl failing in github actions π¨ Fix curl failing in github actions π¨ Fix goreleaser failing π¨ Fix goreleaser failing π¨ Run GitHub actions on PRs and tag push π¨ Fix goreleaser failing because no GITHUB_TOKEN π¨ Add porter to PATH in goreleaser π¨ Send porter path from env π¨ Add feed automation steps π¨ Fix feed upload failing π¨ Fix feed upload failing π¨ Add feed delete step π¨ Fix typo π Dont on build when tag is feed π Skip feed generation for non tag events π¨ Seperate workflows for release and test π Fix not having releases throwing an error π Add README.md π¨ Upgrade delete-tag-and-release to get fixes
- Loading branch information
1 parent
efd772d
commit c77108c
Showing
9 changed files
with
200 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.13 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Install Porter | ||
run: | | ||
curl -fsSLo porter "https://cdn.porter.sh/v0.26.2-beta.1/porter-linux-amd64" | ||
chmod +x porter | ||
- name: GoReleaser Action | ||
if: ${{ !startsWith(github.ref, 'refs/tags/feed') }} | ||
uses: goreleaser/[email protected] | ||
with: | ||
version: latest | ||
args: release --rm-dist --skip-validate --skip-sign | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PORTERPATH: ./porter | ||
- name: Delete Existing Feed | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
tag_name: feed | ||
delete_release: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Prepare Feed | ||
id: prepare_feed | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: feed | ||
release_name: feed | ||
draft: false | ||
prerelease: false | ||
- name: Upload Feed | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.prepare_feed.outputs.upload_url }} | ||
asset_path: ./dist/atom.xml | ||
asset_name: atom.xml | ||
asset_content_type: application/xml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.13 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Install Porter | ||
run: | | ||
curl -fsSLo porter "https://cdn.porter.sh/v0.26.2-beta.1/porter-linux-amd64" | ||
chmod +x porter | ||
- name: GoReleaser Action | ||
uses: goreleaser/[email protected] | ||
with: | ||
version: latest | ||
args: release --rm-dist --skip-validate --skip-sign --snapshot | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PORTERPATH: ./porter |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/bin | ||
/dist | ||
.DS_Store | ||
.test/ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -w -X github.com/dev-drprasad/porter-hashicorp-plugins/pkg.Version=v{{.Version}} -X github.com/dev-drprasad/porter-hashicorp-plugins/pkg.Commit={{.ShortCommit}} | ||
goos: | ||
- darwin | ||
# - windows | ||
- linux | ||
goarch: | ||
- amd64 | ||
hooks: | ||
post: "./build-posthook.sh {{.Env.PORTERPATH}} v{{.Version}}" | ||
|
||
archives: | ||
- format: binary | ||
name_template: "hashicorp-{{ .Os }}-{{ .Arch }}" | ||
|
||
release: | ||
extra_files: | ||
- glob: dist/atom.xml | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^[π¨βͺβ ππ].*" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
### Porter's HashiCorp Plugins | ||
|
||
supports only `secrets` interface | ||
|
||
Install: | ||
|
||
``` | ||
porter plugin install hashicorp --feed-url https://github.com/dev-drprasad/porter-hashicorp-plugins/releases/download/feed/atom.xml | ||
``` | ||
|
||
update `config.yml`: | ||
|
||
``` | ||
default-secrets = "mysecrets" | ||
[[secrets]] | ||
name = "mysecrets" | ||
plugin = "hashicorp.vault" | ||
[secrets.config] | ||
vault_addr = "http://vault.example.com:7500" | ||
path_prefix = "kv" | ||
vault_token = "token" | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<feed xmlns="http://www.w3.org/2005/Atom"> | ||
<id>https://github.com/dev-drprasad/porter-hashicorp-plugins</id> | ||
<title>Porter's Hashicorp Plugins</title> | ||
<updated>{{Updated}}</updated> | ||
<link rel="self" href="https://github.com/dev-drprasad/porter-hashicorp-plugins/releases/download/latest/atom.xml"/> | ||
<author> | ||
<name>REDDY PRASAD (@dev-drprasad)</name> | ||
<uri>https://github.com/dev-drprasad</uri> | ||
</author> | ||
{{#Mixins}} | ||
<category term="{{.}}"/> | ||
{{/Mixins}} | ||
{{#Entries}} | ||
<entry> | ||
<id>porter-hashicorp-plugins ({{Version}})</id> | ||
<title>{{Mixin}} @ {{Version}}</title> | ||
<updated>{{Updated}}</updated> | ||
<category term="{{Mixin}}"/> | ||
<content>{{Version}}</content> | ||
{{#Files}} | ||
<link rel="download" href="https://github.com/dev-drprasad/porter-hashicorp-plugins/releases/download/{{Version}}/{{File}}" /> | ||
{{/Files}} | ||
</entry> | ||
{{/Entries}} | ||
</feed> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
EXECUTABLE=${1:-porter} | ||
|
||
mkdir dist/$2 | ||
|
||
cp 'dist/porter-hashicorp-plugins_darwin_amd64/porter-hashicorp-plugins' "dist/$2/hashicorp-darwin-amd64" | ||
cp "dist/porter-hashicorp-plugins_linux_amd64/porter-hashicorp-plugins" "dist/$2/hashicorp-linux-amd64" | ||
# cp "dist/porter-hashicorp-plugins_windows_amd64/porter-hashicorp-plugins.exe" "dist/$2/porter-hashicorp-plugins-windows-amd64.exe" | ||
|
||
$EXECUTABLE mixin feed generate -d dist/$2 -f dist/atom.xml -t atom-template.xml | ||
exit 0 |
This file contains 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