Skip to content
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

Add a possibility to attach files #1

Merged
merged 10 commits into from
Sep 24, 2020
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
20 changes: 0 additions & 20 deletions .circleci/config.yml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Build pasteme-cli

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
linux_amd64:
name: Build pasteme-cli on linux/amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build pasteme-cli on linux/amd64
run: go build -v -o build/pasteme-cli-linux-amd64

- name: Test
run: go test -v -cover -coverprofile=profile-linux-amd64.out ./...

- name: Codecov linux/amd64
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile-linux-amd64.out
name: coverage linux/amd64

- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
# A file, directory or wildcard pattern that describes what to upload
path: build/
windows_amd64:
name: Build pasteme-cli on windows/amd64
runs-on: windows-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: Get dependencies
run: |
go get -v -t -d ./...
- name: Build pasteme-cli on windows/amd64
run: go build -v -o build/pasteme-cli-windows-amd64.exe

- name: Test
run: go test -v

- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
# A file, directory or wildcard pattern that describes what to upload
path: build/
darwin_amd64:
name: Build pasteme-cli on darwin/amd64
runs-on: macos-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: Get dependencies
run: |
go get -v -t -d ./...
- name: Build pasteme-cli on darwin/amd64
run: go build -v -o build/pasteme-cli-darwin-amd64

- name: Test
run: go test -v

- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
# A file, directory or wildcard pattern that describes what to upload
path: build/
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

18 changes: 3 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,15 @@ all: linux_amd64 darwin_amd64 windows_amd64 checksums

.PHONY: linux_amd64
linux_amd64:
GOOS=linux GOARCH=amd64 go build -v -a -gcflags=-trimpath=$$PWD -asmflags=-trimpath=$$PWD -o build/$(binary_name)-linux-amd64

.PHONY: linux_i386
linux_i386:
GOOS=linux GOARCH=386 go build -v -a -gcflags=-trimpath=$$PWD -asmflags=-trimpath=$$PWD -o build/$(binary_name)-linux-i386
GOOS=linux GOARCH=amd64 go build -v -a -gcflags "all=-trimpath=$$PWD;$$HOME" -asmflags "all=-trimpath=$$PWD;$$HOME" -o build/$(binary_name)-linux-amd64

.PHONY: darwin_amd64
darwin_amd64:
GOOS=darwin GOARCH=amd64 go build -v -a -gcflags=-trimpath=$$PWD -asmflags=-trimpath=$$PWD -o build/$(binary_name)-darwin-amd64

.PHONY: darwin_i386
darwin_i386:
GOOS=darwin GOARCH=386 go build -v -a -gcflags=-trimpath=$$PWD -asmflags=-trimpath=$$PWD -o build/$(binary_name)-darwin-i386
GOOS=darwin GOARCH=amd64 go build -v -a -gcflags "all=-trimpath=$$PWD;$$HOME" -asmflags "all=-trimpath=$$PWD;$$HOME" -o build/$(binary_name)-darwin-amd64

.PHONY: windows_amd64
windows_amd64:
CC=/usr/local/bin/x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -v -a -gcflags=-trimpath=$$PWD -asmflags=-trimpath=$$PWD -o build/$(binary_name)-windows-amd64.exe

.PHONY: windows_i386
windows_i386:
CC=/usr/local/bin/x86_64-w64-mingw32-gcc GOOS=windows GOARCH=386 go build -v -a -gcflags=-trimpath=$$PWD -asmflags=-trimpath=$$PWD -o build/$(binary_name)-windows-i386.exe
CC=/usr/local/bin/x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -v -a -gcflags "all=-trimpath=$$PWD;$$HOME" -asmflags "all=-trimpath=$$PWD;$$HOME" -o build/$(binary_name)-windows-amd64.exe

.PHONY: checksums
checksums:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pasteme-cli

This cli app serves as a purpose to uploading pastes to the pastedb.io service from the command line.
This cli app serves as a purpose to uploading pastes to the paste.me service from the command line.

This makes it easy to paste some config file or other data and share the result with someone.

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/0x111/pastedb-cli
module github.com/0x111/pasteme-cli

go 1.12
go 1.14

require (
github.com/davecgh/go-spew v1.1.0 // indirect
Expand Down
Loading