Create publish-action.yml

Update publish-action.yml

Update publish-action.yml

Update publish-action.yml

Update publish-action.yml

Update publish-action.yml

Update publish-action.yml

export hash only to env

output links

mix events

multi events

on push

labeled
pull/1789/head
bunsenstraat 3 years ago committed by bunsenstraat
parent 1f64b083dc
commit ca09607250
  1. 27
      .github/workflows/publish-action.yml
  2. 5
      apps/remix-ide/ci/publishIpfs

@ -0,0 +1,27 @@
name: remix-publish-action
on:
pull_request:
types: [ labeled ]
jobs:
build:
if: ${{ github.event.label.name == 'publish' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- run: npm install
- run: ls
- run: pwd
- run: npm run downloadsolc_assets
- run: npm run build:production
- run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs')" >> $GITHUB_ENV
- uses: mshick/add-pr-comment@v1
with:
message: |
ipfs://${{ env.action_state }}
https://ipfs.remixproject.org/ipfs/${{ env.action_state }}
https://gateway.ipfs.io/ipfs/${{ env.action_state }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens
allow-repeats: false # This is the default

@ -2,7 +2,6 @@
const IpfsHttpClient = require('ipfs-http-client') const IpfsHttpClient = require('ipfs-http-client')
const { globSource } = IpfsHttpClient const { globSource } = IpfsHttpClient
console.log('current folder', process.cwd())
const folder = process.cwd() + '/dist/apps/remix-ide'; const folder = process.cwd() + '/dist/apps/remix-ide';
(async () => { (async () => {
@ -11,9 +10,7 @@ const folder = process.cwd() + '/dist/apps/remix-ide';
try { try {
let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false })
const hash = result.cid.toString() const hash = result.cid.toString()
console.log('ipfs://' + hash) console.log(hash)
console.log('https://ipfs.remixproject.org/ipfs/' + hash)
console.log('https://gateway.ipfs.io/ipfs/' + hash)
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }

Loading…
Cancel
Save