Skip to content

Commit

Permalink
Merge branch 'master' into snyk-fix-0b0c12ecb1a5c08fd002057a93927cdf
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelRaschke authored Sep 23, 2022
2 parents a3c656b + 11e8ffb commit 90c9158
Show file tree
Hide file tree
Showing 122 changed files with 13,639 additions and 14,430 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json text eol=lf
package-lock.json text eol=lf
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence
# these owners will be requested for review when someone
# opens a pull request.
# All GUI Teams: @ipfs-shipyard/ipfs-gui @ipfs-shipyard/gui @ipfs/gui-dev @ipfs/wg-gui-ux
* @ipfs/gui-dev
9 changes: 7 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
name: Bug report
about: Create a bug report
title: ''
labels: need/triage
labels: kind/bug, need/triage
assignees: ''

---

<!--
Please make sure this issue is not covered in our FAQ/Troubleshoot section:
https://github.com/ipfs/ipfs-desktop#faq--troubleshooting
-->

- OS: [e.g. macOS, Windows, Linux]
- Version of IPFS Desktop [e.g. 0.11.1]
- Version of IPFS Desktop [e.g. 0.20.0]

**Describe the bug**
A clear and concise description of what the bug is.
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/auto-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Auto Assign to IPFS-GUI Project

on:
issues:
types: [opened]
pull_request:
types: [opened]

jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to IPFS-GUI Project
steps:
- name: Assign NEW issues and NEW pull requests to the IPFS-GUI project
uses: actions/add-to-project@v0.1.0
with:
project-url: 'https://github.com/orgs/ipfs/projects/17'
github-token: ${{ secrets.AUTO_PROJECT_PAT }}
17 changes: 11 additions & 6 deletions .github/workflows/chocolatey.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
name: chocolatey

on:
workflow_dispatch:
inputs:
manual_name:
required: true
description: 'Release number to publish (without v prefix)'
default: '0.0.0'
release:
types: [published]

env:
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
release_name: ${{ github.event.release.name }}
release_tag: ${{ github.event.release.tag_name }}
release_name: ${{ github.event.inputs.manual_name || github.event.release.name }}

jobs:
publish:
Expand All @@ -19,10 +24,10 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js for update script
uses: actions/setup-node@v1
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: '14'

- name: Cache bigger downloads
uses: actions/cache@v2
Expand All @@ -38,7 +43,7 @@ jobs:
run: npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm

- name: Download .exe, update version, URL and hash
run: node pkgs\chocolatey\update.js ${{ env.release_name }}
run: node pkgs\chocolatey\update.mjs ${{ env.release_name }}

- name: Create .nupkg
run: cd pkgs\chocolatey && choco pack
Expand Down
119 changes: 113 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: ci
on: [push, pull_request]
on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main

env:
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
Expand All @@ -8,8 +17,66 @@ env:

jobs:

webui:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'

- name: Read ipfs-webui CID from package.json
id: read-webui-version
run: |
echo '::echo::on'
echo "::set-output name=cid::$(grep "build:webui:download" package.json | grep -Eio "bafy[a-z0-9]+")"
echo '::echo::off'
shell: bash
- name: Cache webui
uses: actions/cache@v3
id: webui-cache
with:
path: assets/webui
key: ${{ steps.read-webui-version.outputs.cid }}

- name: Cache bigger downloads
uses: actions/cache@v3
id: cache
if: steps.webui-cache.outputs.cache-hit != 'true'
with:
path: ${{ github.workspace }}/.cache
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }}
${{ runner.os }}-
- uses: ipfs/download-ipfs-distribution-action@v1
if: steps.webui-cache.outputs.cache-hit != 'true'
with:
name: kubo
- uses: ipfs/start-ipfs-daemon-action@v1
if: steps.webui-cache.outputs.cache-hit != 'true'

- name: Install dependencies and fetch ipfs-webui
if: steps.webui-cache.outputs.cache-hit != 'true'
run: |
npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm
npm run clean
npm run force-webui-download
- name: Attach cached ipfs-webui to Github Action
uses: actions/upload-artifact@v2
with:
name: ipfs-webui
path: assets/webui
if-no-files-found: error

test:
runs-on: ${{ matrix.os }}
needs: webui
strategy:
fail-fast: false
matrix:
Expand All @@ -22,10 +89,21 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: 'lts/*'

- name: Read ipfs-webui CID from package.json
id: read-webui-version
run: echo "::set-output name=cid::$(grep "build:webui:download" package.json | grep -Eio "bafy[a-z0-9]+")"
shell: bash
- name: Cache webui
uses: actions/cache@v3
id: webui-cache
with:
path: assets/webui
key: ${{ steps.read-webui-version.outputs.cid }}

- name: Cache bigger downloads
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/.cache
Expand All @@ -34,17 +112,28 @@ jobs:
${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }}
${{ runner.os }}-
- uses: ipfs/download-ipfs-distribution-action@v1
if: steps.webui-cache.outputs.cache-hit != 'true'
with:
name: kubo
- uses: ipfs/start-ipfs-daemon-action@v1
if: steps.webui-cache.outputs.cache-hit != 'true'

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm

- name: Build
run: npm run build

- name: Stop any ipfs daemon before tests
run: ipfs shutdown || true
shell: bash

- name: Test
run: npm run test

- name: Test end-to-end
uses: GabrielBB/xvfb-action@f040be23a619e5ec34116f24098ad3626ceab681 # v1.4
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d # v1.6
with:
working-directory: ${{ github.workspace }}
run: npm run test:e2e
Expand All @@ -67,10 +156,21 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: 'lts/*'

- name: Read ipfs-webui CID from package.json
id: read-webui-version
run: echo "::set-output name=cid::$(grep "build:webui:download" package.json | grep -Eio "bafy[a-z0-9]+")"
shell: bash
- name: Cache webui
uses: actions/cache@v3
id: webui-cache
with:
path: assets/webui
key: ${{ steps.read-webui-version.outputs.cid }}

- name: Cache bigger downloads
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/.cache
Expand All @@ -79,6 +179,13 @@ jobs:
${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }}
${{ runner.os }}-
- uses: ipfs/download-ipfs-distribution-action@v1
if: steps.webui-cache.outputs.cache-hit != 'true'
with:
name: kubo
- uses: ipfs/start-ipfs-daemon-action@v1
if: steps.webui-cache.outputs.cache-hit != 'true'

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm

Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/snapcraft.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
name: snapcraft

on:
workflow_dispatch:
inputs:
manual_name:
required: true
description: 'Release number to publish (without v prefix)'
default: '0.0.0'
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

env:
SNAP_RELEASE_NAME: ${{ github.event.inputs.manual_name || github.event.release.name }}
steps:
- name: Download .snap artifact
uses: dsaltares/fetch-gh-release-asset@aa37ae5c44d3c9820bc12fe675e8670ecd93bd1c # 0.0.5
uses: dsaltares/fetch-gh-release-asset@0efe227dedb360b09ea0e533795d584b61c461a9 # 0.06
with:
repo: ipfs-shipyard/ipfs-desktop
version: tags/${{ github.event.release.tag_name }}
file: ipfs-desktop-${{ github.event.release.name }}-linux-amd64.snap

repo: ipfs/ipfs-desktop
version: tags/v${{ env.SNAP_RELEASE_NAME }}
file: ipfs-desktop-${{ env.SNAP_RELEASE_NAME }}-linux-amd64.snap
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Snapcraft
uses: snapcore/action-publish@f1879414dc5500e02a36f3d715bca6ddd438c913 # 1.0.2
with:
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
snap: ipfs-desktop-${{ github.event.release.name }}-linux-amd64.snap
snap: ipfs-desktop-${{ env.SNAP_RELEASE_NAME }}-linux-amd64.snap
release: stable
26 changes: 26 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Close and mark stale issue

on:
schedule:
- cron: '0 0 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.'
close-issue-message: 'This issue was closed because it is missing author input.'
stale-issue-label: 'kind/stale'
any-of-labels: 'need/author-input'
exempt-issue-labels: 'need/triage,need/community-input,need/maintainer-input,need/maintainers-input,need/analysis,status/blocked,status/in-progress,status/ready,status/deferred,status/inactive'
days-before-issue-stale: 6
days-before-issue-close: 7
enable-statistics: true
15 changes: 8 additions & 7 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[main]
host = https://www.transifex.com
lang_map = zh_CN: zh-CN, zh_HK: zh-HK, zh_TW: zh-TW, ko_KR: ko-KR, pt_PT: pt-PT, pt_BR: pt-BR, ja_JP: ja-JP, hi_IN: hi-IN, he_IL: he-IL, fa_IR: fa-IR, bn_IN: bn-IN, fil_PH: fil-PH
host = https://www.transifex.com
lang_map = ko_KR: ko-KR, bn_IN: bn-IN, he_IL: he-IL, zh_CN: zh-CN, zh_HK: zh-HK, zh_TW: zh-TW, pt_PT: pt-PT, pt_BR: pt-BR, ja_JP: ja-JP, hi_IN: hi-IN, fa_IR: fa-IR, fil_PH: fil-PH

[ipfs-desktop.ipfs-desktop-json]
file_filter = assets/locales/<lang>.json
[o:ipfs:p:ipfs-desktop:r:ipfs-desktop-json]
file_filter = assets/locales/<lang>.json
source_file = assets/locales/en.json
source_lang = en
type = KEYVALUEJSON
minimum_perc = 30
source_file = assets/locales/en.json
source_lang = en
type = KEYVALUEJSON

Loading

0 comments on commit 90c9158

Please sign in to comment.