-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (67 loc) · 3.26 KB
/
ipfs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout github repo
uses: actions/checkout@v2
- name: Fetch updated files
uses: tj-actions/changed-files@v39
with:
files_yaml: |
json: socializing-pool-merkle/**
id: changed_files
- name: Run step only if one file change in folder
if: steps.changed_files.outputs.json_all_changed_files_count != '1'
run: |
echo "ERROR: ${{ steps.changed_files.outputs.json_all_changed_files_count }} file/s changed in socializing-pool-merkle folder. Only one file change allowed."
echo "Files changed in socializing-pool-merkle folder: ${{ steps.changed_files.outputs.json_all_changed_files }}"
exit 1
- name: Upload to IPFS
uses: aquiladev/[email protected]
id: ipfs_upload
with:
# Directory/File path to upload
path: ${{steps.changed_files.outputs.json_all_changed_files}}
# Type of target service to upload. Supported services [ipfs, pinata, infura, filebase]
service: infura # optional, default is ipfs
# [infura] Project ID. Required for infura service
infuraProjectId: ${{ secrets.INFURA_PROJECT_ID }} # optional
# [infura] Project Secret. Required for infura service
infuraProjectSecret: ${{ secrets.INFURA_PROJECT_SECRET }} # optional
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: |
file changed: [${{ steps.changed_files.outputs.json_all_changed_files }}](https://github.com/${{ github.repository }}/blob/${{ github.head_ref || github.ref_name }}/${{ steps.changed_files.outputs.json_all_changed_files }})
ipfs hash: `${{steps.ipfs_upload.outputs.ipfs}}`
You can also access the Reward merkle trees from an IPFS gateway.
- https://ipfs.io/ipfs/${{steps.ipfs_upload.outputs.ipfs}}
- [ipfs://${{steps.ipfs_upload.outputs.ipfs}}](ipfs://${{steps.ipfs_upload.outputs.ipfs}})
${{ steps.tag_version.outputs.changelog }}
draft: false
prerelease: false