-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
118 additions
and
0 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,34 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
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: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
if [ -f Gopkg.toml ]; then | ||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
dep ensure | ||
fi | ||
- name: Test | ||
run: go test -v ./... |
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,43 @@ | ||
name: Snapcraft Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
snapcraft-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Snapcraft | ||
run: | | ||
sudo snap install snapcraft --classic | ||
sudo snap install lxd | ||
sudo usermod --append --groups lxd $USER | ||
echo "::add-path::/snap/bin" | ||
sudo chown root:root / | ||
sudo /snap/bin/lxd.migrate -yes | ||
sudo /snap/bin/lxd waitready | ||
sudo /snap/bin/lxd init --auto | ||
# You can now run Snapcraft shell commands | ||
- name: Use Snapcraft | ||
run: snapcraft --help | ||
|
||
- name: Login snapcraft | ||
run: | | ||
LOGIN_FILEPATH=/tmp/credential | ||
echo "${{ secrets.SNAPCRAFT_TOKEN }}" > $LOGIN_FILEPATH | ||
snapcraft login --with $LOGIN_FILEPATH | ||
- name: Build snap | ||
run: sg lxd -c 'snapcraft --use-lxd' | ||
|
||
- name: Publish snap | ||
run: | | ||
snapcraft push ipfs-pinner_0+git.$(git rev-parse --short HEAD)_amd64.snap --release=stable,edge | ||
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,39 @@ | ||
name: ipfs-pinner | ||
|
||
version: 'git' | ||
|
||
summary: A toolkit to upload files to IPFS pinning services. | ||
|
||
description: | | ||
ipfs-pinner is a toolkit to help upload files or specific content id to IPFS pinning services. | ||
Website https://github.com/wabarc/ipfs-pinner | ||
Supported Pinning Services: | ||
1.Infura | ||
Infura is a freemium pinning service that doesn't require any additional setup. It's the default one used. | ||
Please bear in mind that Infura is a free service, so there is probably a rate-limiting. https://infura.io | ||
Usage:ipfs-pinner file-to-path | ||
2.Pinata | ||
Pinata is a freemium pinning service. It gives you more control over what's uploaded. | ||
You can delete, label and add custom metadata. This service requires signup. https://pinata.cloud/ | ||
Usage:ipfs-pinner -p pinata file-to-path | ||
grade: stable | ||
|
||
confinement: strict | ||
|
||
base: core18 | ||
|
||
parts: | ||
ipfs-pinner: | ||
plugin: go | ||
source: https://github.com/wabarc/ipfs-pinner.git | ||
go-importpath: github.com/wabarc/ipfs-pinner/cmd/ipfs-pinner | ||
build-packages: | ||
- build-essential | ||
|
||
apps: | ||
ipfs-pinner: | ||
command: ipfs-pinner |