diff --git a/.babelrc b/.babelrc index f60bd75e8..abf4798b2 100644 --- a/.babelrc +++ b/.babelrc @@ -4,8 +4,8 @@ "@babel/env", { "targets": { - "chrome": "96", - "node": 16 + "chrome": "106", + "node": "16.16.0" } } ] diff --git a/.eslintrc.js b/.eslintrc.js index 14c73fcdc..d1af5515a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -32,12 +32,14 @@ module.exports = { plugins: ['vue'], rules: { - 'space-before-function-paren': 0, + 'space-before-function-paren': 'off', 'comma-dangle': ['error', 'never'], 'vue/no-v-html': 'off', - 'no-console': 0, - 'no-unused-vars': 1, - 'no-undef': 1, - 'vue/no-template-key': 1 + 'no-console': ['error', { allow: ['warn', 'error'] }], + 'no-unused-vars': 'warn', + 'no-undef': 'warn', + 'vue/no-template-key': 'warn', + 'vue/no-useless-template-attributes': 'off', + 'vue/multi-word-component-names': 'off' } } diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 464ec55de..6daae4e51 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -15,7 +15,7 @@ body: options: - label: I have encountered this bug in the [latest release of FreeTube](https://github.com/FreeTubeApp/FreeTube/releases). required: true - - label: I have searched the [issue tracker](https://github.com/FreeTubeApp/FreeTube/issues) for a bug report that matches the one I want to file, without success. + - label: I have searched the [issue tracker](https://github.com/FreeTubeApp/FreeTube/issues) for open and closed issues that are similar to the bug report I want to file, without success. required: true - label: I have searched the [documentation](https://docs.freetubeapp.io/) for information that matches the description of the bug I want to file, without success. required: true @@ -85,10 +85,12 @@ body: - .dmg - .exe - Flathub + - MPR - .pacman - Portable - PortableApps - .rpm + - Scoop - winget - .zip - other diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index c010ec761..868b9ef1d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -13,7 +13,7 @@ body: label: Guidelines description: Please ensure you've completed all of the following. options: - - label: I have searched the [issue tracker](https://github.com/FreeTubeApp/FreeTube/issues) for a feature request that matches the one I want to file, without success. + - label: I have searched the [issue tracker](https://github.com/FreeTubeApp/FreeTube/issues) for open and closed issues that are similar to the feature request I want to file, without success. required: true - label: I have searched the [documentation](https://docs.freetubeapp.io/) for information that matches the description of the feature request I want to file, without success. required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4b21f07a9..2b3779e6f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,34 +1,36 @@ ---- -Title ---- +# Title -**Important note** -We may remove your pull request if you do not use this provided PR template correctly. + + -**Pull Request Type** -Please select what type of pull request this is: +## Pull Request Type + - [ ] Bugfix - [ ] Feature Implementation - [ ] Documentation - [ ] Other -**Related issue** -Please link the issue your pull request is referring to. If this pull request fully resolves the relevant issue, put "closes" before the issue number. Example: "closes #123456". +## Related issue + + + -**Description** -Please write a clear and concise description of what the pull request does. +## Description + -**Screenshots (if appropriate)** -Please add before and after screenshots if there is a visible change. +## Screenshots + -**Testing (for code that is not small enough to be easily understandable)** -Has this pull request been tested? -Please describe shortly how you tested it and whether there are any ramifications remaining. +## Testing + + + -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - OS Version: [e.g. 22] - - FreeTube version: [e.g. 0.8] +## Desktop + +- **OS:** +- **OS Version:** +- **FreeTube version:** -**Additional context** -Add any other context about the problem here. +## Additional context + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..396fc42b3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + labels: + - "PR: waiting for review" + - "PR: dependencies" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "PR: waiting for review" + - "PR: dependencies" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..dff087046 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,19 @@ +'PR: waiting for review': + - '*' + - '.babelrc' + - '.editorconfig' + - '.eslintignore' + - '.eslintrc.js' + - '.gitignore' + - '.prettierrc' + - '.whitesource' + - '.github/**/*' + - '.vscode/**/*' + - '_icons/**/*' + - '_scripts/**/*' + - 'src/**/*' + - 'static/**/*' + +'PR: dependencies': + - 'yarn.lock' + - 'package.json' diff --git a/.github/workflows/autoLabelIssue.yaml b/.github/workflows/autoLabelIssue.yaml index adf9a90c2..f5f14d54b 100644 --- a/.github/workflows/autoLabelIssue.yaml +++ b/.github/workflows/autoLabelIssue.yaml @@ -10,5 +10,95 @@ jobs: - uses: Naturalclar/issue-action@v2.0.2 with: body: "both" - parameters: '[ {"keywords": ["visual bug"], "labels": ["B: visual"]}, {"keywords": ["AUR", "Chocolatey", "PortableApps", "winget"], "labels": ["B: Unofficial Download"]}, {"keywords": ["keyboard control not working"], "labels": ["B: keyboard control"]}, {"keywords": ["text/string issue"], "labels": ["B: text/string"]}, {"keywords": ["content not loading"], "labels": ["B: content not loading"]}, {"keywords": ["accessibility issue"], "labels": ["B: accessibility"]}, {"keywords": ["usability issue"], "labels": ["B: usability"]}, {"keywords": ["causes crash"], "labels": ["B: crash"]}, {"keywords": ["feature stopped working"], "labels": ["B: feature stopped working"]}, {"keywords": ["inconsistent behavior"], "labels": ["B: inconsistent behavior"]}, {"keywords": ["data loss"], "labels": ["B: data loss"]}, {"keywords": ["race condition"], "labels": ["B: race condition"]}, {"keywords": ["API issue"], "labels": ["B: API issue"]}, {"keywords": ["only happens in developer mode"], "labels": ["B: developer mode"]}, {"keywords": ["improvement to existing feature"], "labels": ["E: improvement existing feature"]}, {"keywords": ["new optional setting"], "labels": ["E: new optional setting"]}, {"keywords": ["visual improvement"], "labels": ["E: visual improvement"]}, {"keywords": ["display more information to user"], "labels": ["E: display more information"]}, {"keywords": ["ease of use improvement"], "labels": ["E: ease of use improvement"]}, {"keywords": ["support for external software"], "labels": ["E: support external software"]}, {"keywords": ["new feature"], "labels": ["E: new feature"]}, {"keywords": ["new keyboard shortcut"], "labels": ["E: keyboard shortcut"]}]' + parameters: >- + [ + { + "keywords": ["visual bug"], + "labels": ["B: visual"] + }, + { + "keywords": ["AUR", "Chocolatey", "PortableApps", "winget", "Scoop", "MPR"], + "labels": ["B: Unofficial Download"] + }, + { + "keywords": ["keyboard control not working"], + "labels": ["B: keyboard control"] + }, + { + "keywords": ["text/string issue"], + "labels": ["B: text/string"] + }, + { + "keywords": ["content not loading"], + "labels": ["B: content not loading"] + }, + { + "keywords": ["accessibility issue"], + "labels": ["B: accessibility"] + }, + { + "keywords": ["usability issue"], + "labels": ["B: usability"] + }, + { + "keywords": ["causes crash"], + "labels": ["B: crash"] + }, + { + "keywords": ["feature stopped working"], + "labels": ["B: feature stopped working"] + }, + { + "keywords": ["inconsistent behavior"], + "labels": ["B: inconsistent behavior"] + }, + { + "keywords": ["data loss"], + "labels": ["B: data loss"] + }, + { + "keywords": ["race condition"], + "labels": ["B: race condition"] + }, + { + "keywords": ["API issue"], + "labels": ["B: API issue"] + }, + { + "keywords": ["only happens in developer mode"], + "labels": ["B: developer mode"] + }, + { + "keywords": ["improvement to existing feature"], + "labels": ["E: improvement existing feature"] + }, + { + "keywords": ["new optional setting"], + "labels": ["E: new optional setting"] + }, + { + "keywords": ["visual improvement"], + "labels": ["E: visual improvement"] + }, + { + "keywords": ["display more information to user"], + "labels": ["E: display more information"] + }, + { + "keywords": ["ease of use improvement"], + "labels": ["E: ease of use improvement"] + }, + { + "keywords": ["support for external software"], + "labels": ["E: support external software"] + }, + { + "keywords": ["new feature"], + "labels": ["E: new feature"] + }, + { + "keywords": ["new keyboard shortcut"], + "labels": ["E: keyboard shortcut"] + } + ] github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77b99a85f..f184051d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,37 +6,56 @@ name: Build on: push: branches: [ master, development, '**-RC' ] + workflow_dispatch: jobs: build: strategy: matrix: node-version: [16.x] - runtime: [ linux-x64, linux-arm64, win-x64, osx-x64 ] + runtime: + - linux-x64 + - linux-armv7l + - linux-arm64 + - win-x64 + - win-arm64 + - osx-x64 + # `osx-arm64` disabled due to "macOS gatekeeper" + # See details in https://github.com/FreeTubeApp/FreeTube/pull/2113 + # - osx-arm64 include: - runtime: linux-x64 os: ubuntu-latest + - runtime: linux-armv7l + os: ubuntu-latest + - runtime: linux-arm64 os: ubuntu-latest - runtime: osx-x64 os: macOS-latest +# - runtime: osx-arm64 +# os: macOS-latest + - runtime: win-x64 os: windows-latest + - runtime: win-arm64 + os: windows-latest + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: "yarn" - - run: npm run ci - - run: npm run lint + - run: yarn run ci + - run: yarn run lint - name: Get Version Number uses: nyaayaya/package-version@v1 with: @@ -45,7 +64,7 @@ jobs: - name: Set Version Number Variable id: versionNumber - uses: actions/github-script@v3 + uses: actions/github-script@v6 env: IS_DEV: ${{ contains(github.ref, 'development') }} IS_RC: ${{ contains(github.ref, 'RC') }} @@ -65,7 +84,7 @@ jobs: # script: if ${{ env.IS_DEV }} then echo "::set-output name=VERSION_NUMBER::${{ env.VERSION_NUMBER_NIGHTLY }}" else echo "::set-output name=VERSION_NUMBER::${{ env.VERSION_NUMBER }}" fi - name: Update package.json version - uses: jossef/action-set-json-field@v1 + uses: jossef/action-set-json-field@v2 with: file: package.json field: version @@ -73,125 +92,243 @@ jobs: - name: Install libarchive-tools - if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') + if: startsWith(matrix.os, 'ubuntu') run: sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}" - name: Build x64 with Node.js ${{ matrix.node-version}} if: contains(matrix.runtime, 'x64') - run: npm run build --if-present + run: yarn run build + + - name: Build ARMv7l with Node.js ${{ matrix.node-version}} + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + run: yarn run build:arm32 - name: Build ARM64 with Node.js ${{ matrix.node-version}} - if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') - run: npm run build:arm64 --if-present + if: contains(matrix.runtime, 'arm64') + run: yarn run build:arm64 - name: Upload Linux .zip x64 Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_x64 path: build/freetube-${{ steps.versionNumber.outputs.result }}.zip - - name: Upload Linux .zip ARM Artifact - uses: actions/upload-artifact@v2 + - name: Upload Linux .7z x64 Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_x64.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}.7z + + - name: Upload Linux .zip ARMv7l Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_armv7l + path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.zip + + - name: Upload Linux .7z ARMv7l Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_armv7l.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.7z + + - name: Upload Linux .zip ARM64 Artifact + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_arm64 path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.zip + - name: Upload Linux .7z ARM64 Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_arm64.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.7z + - name: Upload .deb x64 Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.deb path: build/freetube_${{ steps.versionNumber.outputs.result }}_amd64.deb - - name: Upload .deb ARM Artifact - uses: actions/upload-artifact@v2 + - name: Upload .deb ARMv7l Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb + path: build/freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb + + - name: Upload .deb ARM64 Artifact + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_arm64.deb path: build/freetube_${{ steps.versionNumber.outputs.result }}_arm64.deb - name: Upload AppImage x64 Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.AppImage path: build/FreeTube-${{ steps.versionNumber.outputs.result }}.AppImage - - name: Upload AppImage ARM Artifact - uses: actions/upload-artifact@v2 + - name: Upload AppImage ARMv7l Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.AppImage + path: build/FreeTube-${{ steps.versionNumber.outputs.result }}-armv7l.AppImage + + - name: Upload AppImage ARM64 Artifact + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_arm64.AppImage path: build/FreeTube-${{ steps.versionNumber.outputs.result }}-arm64.AppImage - name: Upload .rpm x64 Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.rpm path: build/freetube-${{ steps.versionNumber.outputs.result }}.x86_64.rpm - - name: Upload .rpm ARM Artifact - uses: actions/upload-artifact@v2 + # rpm are not built for armv7l + + - name: Upload .rpm ARM64 Artifact + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_arm64.rpm path: build/freetube-${{ steps.versionNumber.outputs.result }}.aarch64.rpm - name: Upload Alpine .apk x64 Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_amd64.apk path: build/freetube-${{ steps.versionNumber.outputs.result }}.apk - - name: Upload Alpine .apk ARM Artifact - uses: actions/upload-artifact@v2 + - name: Upload Alpine .apk ARMv7l Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + with: + name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_armv7l.apk + path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.apk + + - name: Upload Alpine .apk ARM64 Artifact + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_arm64.apk path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.apk - name: Upload Pacman .pacman x64 Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.pacman path: build/freetube-${{ steps.versionNumber.outputs.result }}.pacman # - name: Upload Web Build - # uses: actions/upload-artifact@v2 + # uses: actions/upload-artifact@v3 # if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') # with: # name: freetube_${{ steps.versionNumber.outputs.result }}_static_web # path: dist/web - - name: Upload Windows .exe Artifact - uses: actions/upload-artifact@v2 - if: startsWith(matrix.os, 'windows') - with: - name: freetube-${{ steps.versionNumber.outputs.result }}-win-x64-portable - path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.zip - - - name: Upload Windows .zip Artifact - uses: actions/upload-artifact@v2 - if: startsWith(matrix.os, 'windows') + - name: Upload Windows x64 .exe Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe - - name: Upload Windows Portable Artifact - uses: actions/upload-artifact@v2 - if: startsWith(matrix.os, 'windows') + - name: Upload Windows arm64 .exe Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-setup-arm64.exe + path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe + + - name: Upload Windows x64 .zip Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-win-x64-portable + path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.zip + + - name: Upload Windows x64 .7z Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-win-x64-portable.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.7z + + - name: Upload Windows arm64 .zip Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable + path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.zip + + - name: Upload Windows arm64 .7z Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.7z + + - name: Upload Windows x64 Portable Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-portable-x64.exe path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe - - name: Upload Mac .dmg Artifact - uses: actions/upload-artifact@v2 - if: startsWith(matrix.os, 'macos') + - name: Upload Windows arm64 Portable Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') with: - name: freetube-${{ steps.versionNumber.outputs.result }}-mac.dmg + name: freetube-${{ steps.versionNumber.outputs.result }}-portable-arm64.exe + path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe + + - name: Upload Mac x64 .dmg Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg + +# - name: Upload Mac arm64 .dmg Artifact +# uses: actions/upload-artifact@v3 +# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') +# with: +# name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg +# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg + + - name: Upload Mac x64 .zip Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.zip + path: build/freetube-${{ steps.versionNumber.outputs.result }}-mac.zip + + - name: Upload Mac x64 .7z Artifact + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}-mac.7z + +# - name: Upload Mac arm64 .zip Artifact +# uses: actions/upload-artifact@v3 +# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') +# with: +# name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.zip +# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.zip diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml new file mode 100644 index 000000000..c3953aa32 --- /dev/null +++ b/.github/workflows/calibreapp-image-actions.yml @@ -0,0 +1,28 @@ +# Compress images on demand (workflow_dispatch), and at 12am every Sunday (schedule). +# Open a Pull Request if any images can be compressed. +name: Compress Images +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' +jobs: + build: + name: calibreapp/image-actions + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Compress Images + id: calibre + uses: calibreapp/image-actions@main + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + compressOnly: true + - name: Create New Pull Request If Needed + if: steps.calibre.outputs.markdown != '' + uses: peter-evans/create-pull-request@v4 + with: + title: Compressed Images Nightly + branch-suffix: timestamp + commit-message: Compressed Images + body: ${{ steps.calibre.outputs.markdown }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..f7c01e4fa --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,63 @@ +name: "CodeQL" + +on: + push: + branches: [ "development" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "development" ] + schedule: + - cron: '36 3 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # âšī¸ Command-line programs to run using the OS shell. + # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/conflicts.yml b/.github/workflows/conflicts.yml new file mode 100644 index 000000000..c0f221025 --- /dev/null +++ b/.github/workflows/conflicts.yml @@ -0,0 +1,25 @@ +name: "Conflicts" +on: + # So that PRs touching the same files as the push are updated + push: + # So that the `dirtyLabel` is removed if conflicts are resolve + # We recommend `pull_request_target` so that github secrets are available. + # In `pull_request` we wouldn't be able to change labels of fork PRs + pull_request_target: + types: [synchronize] + workflow_run: + workflows: ['Dummy workflow for conflicts'] + types: [requested] + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: check if prs are dirty + uses: eps1lon/actions-label-merge-conflict@releases/2.x + with: + dirtyLabel: "PR: merge conflicts / rebase needed" + removeOnDirtyLabel: "PR: waiting for review" + repoToken: "${{ secrets.GITHUB_TOKEN }}" + commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." + commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." diff --git a/.github/workflows/dummy-conflicts.yml b/.github/workflows/dummy-conflicts.yml new file mode 100644 index 000000000..cc4ba4250 --- /dev/null +++ b/.github/workflows/dummy-conflicts.yml @@ -0,0 +1,9 @@ +name: Dummy workflow for conflicts +on: + pull_request_review: + types: [submitted] +jobs: + dummy: + runs-on: ubuntu-latest + steps: + - run: echo "this is a dummy workflow that triggers a workflow_run; it's necessary because otherwise the repo secrets will not be in scope for externally forked pull requests" diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index ad6c44646..bc1b7ed4f 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -15,10 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: repository: flathub/io.freetubeapp.FreeTube - token: ${{ secrets.PUSH_TOKEN }} + token: ${{ secrets.FLATHUB_TOKEN }} - name: GitHub API exec action uses: moustacheful/github-api-exec-action@v0 id: api_results @@ -36,7 +36,7 @@ jobs: - name: Install xmlstarlet run: sudo apt -y install xmlstarlet - name: Create Version Variable - uses: bluwy/substitute-string-action@v1 + uses: bluwy/substitute-string-action@v2 id: sub with: _input-text: ${{ fromJson(steps.api_results.outputs.result).tag_name }} @@ -77,25 +77,13 @@ jobs: date +"%Y-%m-%d" >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - name: Update x64 File Location in yml File - uses: mikefarah/yq@4.0.0-beta1 - with: - # The Command which should be run - cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].url 'https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-x64.zip' + run: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].url 'https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-x64.zip' - name: Update x64 Hash in yml File - uses: mikefarah/yq@4.0.0-beta1 - with: - # The Command which should be run - cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].sha256 ${{ env.HASH_X64 }} + run: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].sha256 ${{ env.HASH_X64 }} - name: Update ARM File Location in yml File - uses: mikefarah/yq@4.0.0-beta1 - with: - # The Command which should be run - cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].url 'https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-arm64.zip' + run: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].url 'https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-arm64.zip' - name: Update ARM Hash in yml File - uses: mikefarah/yq@4.0.0-beta1 - with: - # The Command which should be run - cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].sha256 ${{ env.HASH_ARM64 }} + run: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].sha256 ${{ env.HASH_ARM64 }} - name: Add Patch Notes to XML File run: xmlstarlet ed -L -i /application/releases/release[1] -t elem -n releaseTMP -v "" -i //releaseTMP -t attr -n version -v "${{ steps.sub.outputs.result }} Beta" -i //releaseTMP -t attr -n date -v "${{ env.CURRENT_DATE }}" -s //releaseTMP -t elem -n url -v "" -s //releaseTMP/url -t text -n "" -v "https://github.com/FreeTubeApp/FreeTube/releases/tag/v${{ steps.sub.outputs.result }}-beta" -r //releaseTMP -v "release" io.freetubeapp.FreeTube.metainfo.xml - name: Remove Release Files @@ -108,7 +96,7 @@ jobs: # Optional but recommended # Defaults to "Apply automatic changes" commit_message: Update files for v${{ steps.sub.outputs.result }} - token: ${{ secrets.PUSH_TOKEN }} + token: ${{ secrets.FLATHUB_TOKEN }} # Optional options appended to `git-commit` # See https://git-scm.com/docs/git-commit for a list of available options @@ -118,7 +106,7 @@ jobs: skip_dirty_check: true - name: Create PR run: | - echo ${{ secrets.PUSH_TOKEN }} >> auth.txt + echo ${{ secrets.FLATHUB_TOKEN }} >> auth.txt gh auth login --with-token < auth.txt rm auth.txt gh pr create --title "Release v${{ steps.sub.outputs.result }}" --body "This is an automated PR for the v${{ steps.sub.outputs.result }} release. This PR will be updated and merged once testing is complete." diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml new file mode 100644 index 000000000..492a3ab71 --- /dev/null +++ b/.github/workflows/label-pr.yml @@ -0,0 +1,15 @@ +name: "Pull Request Labeler" +on: + pull_request_target: + types: [opened, reopened] + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3b9015b9c..ce0a1101d 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -17,11 +17,11 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js 16.x - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x cache: "yarn" - - run: npm run ci - - run: npm run lint + - run: yarn run ci + - run: yarn run lint diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index f4a51d270..a0a8bf8fc 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -20,5 +20,5 @@ jobs: This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. - daysUntilClose: 21 + daysUntilClose: 14 responseRequiredLabel: "U: Waiting for Response from Author" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 962124ffd..7cc9d89ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,31 +13,49 @@ jobs: strategy: matrix: node-version: [16.x] - runtime: [ linux-x64, linux-arm64, win-x64, osx-x64 ] + runtime: + - linux-x64 + - linux-armv7l + - linux-arm64 + - win-x64 + - win-arm64 + - osx-x64 + # `osx-arm64` disabled due to "macOS gatekeeper" + # See details in https://github.com/FreeTubeApp/FreeTube/pull/2113 + # - osx-arm64 include: - runtime: linux-x64 os: ubuntu-latest + - runtime: linux-armv7l + os: ubuntu-latest + - runtime: linux-arm64 os: ubuntu-latest - runtime: osx-x64 os: macOS-latest +# - runtime: osx-arm64 +# os: macOS-latest + - runtime: win-x64 os: windows-latest + - runtime: win-arm64 + os: windows-latest + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: "yarn" - - run: npm run ci - - run: npm run lint + - run: yarn run ci + - run: yarn run lint - name: Get Version Number uses: nyaayaya/package-version@v1 @@ -47,11 +65,15 @@ jobs: - name: Build x64 with Node.js ${{ matrix.node-version}} if: contains(matrix.runtime, 'x64') - run: npm run build --if-present + run: yarn run build + + - name: Build ARMv7l with Node.js ${{ matrix.node-version}} + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + run: yarn run build:arm32 - name: Build ARM64 with Node.js ${{ matrix.node-version}} - if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') - run: npm run build:arm64 --if-present + if: contains(matrix.runtime, 'arm64') + run: yarn run build:arm64 - name: Upload AppImage x64 Release uses: actions/upload-release-asset@v1 @@ -75,7 +97,40 @@ jobs: asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.zip asset_content_type: application/zip - - name: Upload Linux .zip ARM Release + - name: Upload Linux .7z x64 Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-linux-portable-x64.7z + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.7z + asset_content_type: application/x-7z-compressed + + - name: Upload Linux .zip ARMv7l Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-linux-portable-armv7l.zip + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-armv7l.zip + asset_content_type: application/zip + + - name: Upload Linux .7z ARMv7l Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-linux-portable-armv7l.7z + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-armv7l.7z + asset_content_type: application/x-7z-compressed + + - name: Upload Linux .zip ARM64 Release uses: actions/upload-release-asset@v1 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') env: @@ -86,6 +141,17 @@ jobs: asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64.zip asset_content_type: application/zip + - name: Upload Linux .7z ARM64 Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-linux-portable-arm64.7z + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64.7z + asset_content_type: application/x-7z-compressed + - name: Upload Linux .deb x64 Release uses: actions/upload-release-asset@v1 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') @@ -97,7 +163,18 @@ jobs: asset_path: build/freetube_${{ env.PACKAGE_VERSION }}_amd64.deb asset_content_type: application/vnd.debian.binary-package - - name: Upload Linux .deb ARM Release + - name: Upload Linux .deb ARMv7l Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb + asset_path: build/freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb + asset_content_type: application/vnd.debian.binary-package + + - name: Upload Linux .deb ARM64 Release uses: actions/upload-release-asset@v1 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') env: @@ -119,7 +196,9 @@ jobs: asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.x86_64.rpm asset_content_type: application/x-rpm - - name: Upload Linux .rpm ARM Release + # rpm are not built for armv7l + + - name: Upload Linux .rpm ARM64 Release uses: actions/upload-release-asset@v1 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') env: @@ -130,9 +209,9 @@ jobs: asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.aarch64.rpm asset_content_type: application/x-rpm - - name: Upload Windows .exe Release + - name: Upload Windows x64 .exe Release uses: actions/upload-release-asset@v1 - if: startsWith(matrix.os, 'windows') + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -141,9 +220,20 @@ jobs: asset_path: build/freetube Setup ${{ env.PACKAGE_VERSION }}.exe asset_content_type: application/x-ms-dos-executable - - name: Upload Windows .zip Release + - name: Upload Windows arm64 .exe Release uses: actions/upload-release-asset@v1 - if: startsWith(matrix.os, 'windows') + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-setup-arm64.exe + asset_path: build/freetube Setup ${{ env.PACKAGE_VERSION }}.exe + asset_content_type: application/x-ms-dos-executable + + - name: Upload Windows x64 .zip Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -152,13 +242,113 @@ jobs: asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-win.zip asset_content_type: application/zip - - name: Upload Mac .dmg Release + - name: Upload Windows x64 .7z Release uses: actions/upload-release-asset@v1 - if: startsWith(matrix.os, 'macos') + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} - asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac.dmg + asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-x64-portable.7z + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-win.7z + asset_content_type: application/x-7z-compressed + + - name: Upload Windows arm64 .zip Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.zip + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-win.zip + asset_content_type: application/zip + + - name: Upload Windows arm64 .7z Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.7z + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-win.7z + asset_content_type: application/x-7z-compressed + + - name: Upload Windows x64 portable Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-x64-portable.exe + asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe + asset_content_type: application/x-ms-dos-executable + + - name: Upload Windows arm64 portable Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.exe + asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe + asset_content_type: application/x-ms-dos-executable + + - name: Upload Mac x64 .dmg Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-x64.dmg asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.dmg asset_content_type: application/x-apple-diskimage + +# - name: Upload Mac arm64 .dmg Release +# uses: actions/upload-release-asset@v1 +# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} +# asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.dmg +# asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64.dmg +# asset_content_type: application/x-apple-diskimage + + - name: Upload Mac x64 .zip Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-x64.zip + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-mac.zip + asset_content_type: application/zip + + - name: Upload Mac x64 .7z Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-x64.7z + asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-mac.7z + asset_content_type: application/x-7z-compressed + +# - name: Upload Mac arm64 .zip Release +# uses: actions/upload-release-asset@v1 +# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} +# asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.zip +# asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-mac.zip +# asset_content_type: application/x-apple-diskimage + diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index e24f0b48e..fddf6630d 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -4,7 +4,7 @@ name: Project Board Automation on: issues: - types: [labeled, unlabeled, closed, deleted] + types: [closed, deleted, reopened, opened] jobs: assign-issues-to-projects: @@ -13,38 +13,58 @@ jobs: # For bug reports - name: New bug issue - uses: alex-page/github-project-automation-plus@v0.5.1 - if: github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'bug') + uses: alex-page/github-project-automation-plus@v0.8.2 + if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'opened' with: project: Bug Reports column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} action: update - - - name: Bug label removed - uses: alex-page/github-project-automation-plus@v0.5.1 - if: github.event.action == 'unlabeled' || github.event.action == 'closed' || github.event.action == 'deleted' + + - name: Bug issue closed + uses: alex-page/github-project-automation-plus@v0.8.2 + if: github.event.action == 'closed' || github.event.action == 'deleted' with: action: delete project: Bug Reports column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} + + - name: Bug issue reopened + uses: alex-page/github-project-automation-plus@v0.8.2 + if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'reopened' + with: + project: Bug Reports + column: To assign + repo-token: ${{ secrets.PUSH_TOKEN }} + action: update # For feature requests - name: New feature issue - uses: alex-page/github-project-automation-plus@v0.5.1 - if: github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'enhancement') + uses: alex-page/github-project-automation-plus@v0.8.2 + if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'opened' with: project: Feature Requests column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} action: update - - name: Feature request label removed - uses: alex-page/github-project-automation-plus@v0.5.1 - if: github.event.action == 'unlabeled' || github.event.action == 'closed' || github.event.action == 'deleted' + - name: Feature request issue closed + uses: alex-page/github-project-automation-plus@v0.8.2 + if: github.event.action == 'closed' || github.event.action == 'deleted' with: action: delete project: Feature Requests column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} + + - name: Feature request issue reopened + uses: alex-page/github-project-automation-plus@v0.8.2 + if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'reopened' + with: + project: Feature Requests + column: To assign + repo-token: ${{ secrets.PUSH_TOKEN }} + action: update + + diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..02a937fe3 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,21 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v6 + with: + stale-issue-message: 'This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + stale-pr-message: 'This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.' + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' + close-pr-message: 'This PR was closed because it has been stalled for 14 days with no activity.' + days-before-issue-stale: 28 + days-before-pr-stale: 28 + days-before-issue-close: 7 + days-before-pr-close: 14 + stale-issue-label: 'U: stale' + stale-pr-label: 'PR: stale' diff --git a/README.md b/README.md index a7acefd3e..9b03d688e 100644 --- a/README.md +++ b/README.md @@ -6,79 +6,86 @@ FreeTube is an open source desktop YouTube player built with privacy in mind. Use YouTube without advertisements and prevent Google from tracking you with their cookies and JavaScript. Available for Windows, Mac & Linux thanks to Electron. -Please note that FreeTube is currently in Beta. While it should work well for -most users, there are still bugs and missing features that need to be -addressed. +
-[Download FreeTube](https://github.com/FreeTubeApp/FreeTube/releases) +Screenshots • How does it work? • Features • Download Links • Contributing • Localization • Contact • Donate • License
+Website • Blog • Documentation • FAQ • Discussions
+