Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Aug 21, 2020
1 parent 787d212 commit 92ebb84
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/go.yml
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 ./...
43 changes: 43 additions & 0 deletions .github/workflows/snapcraft.yml
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ipfs-pinner

[![ipfs-pinner](https://snapcraft.io/ipfs-pinner/badge.svg)](https://snapcraft.io/ipfs-pinner)

`ipfs-pinner` is a toolkit to help upload files or specific content id to IPFS pinning services.

## Installation
Expand Down
39 changes: 39 additions & 0 deletions snapcraft.yaml
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

0 comments on commit 92ebb84

Please sign in to comment.