1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 10:22:31 +01:00

use github actions for building

will add snap later
This commit is contained in:
Mikael Finstad 2020-02-10 15:24:30 +08:00
parent 43de86aaa5
commit 058b79d7d3
6 changed files with 558 additions and 484 deletions

45
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Build/release
on: push
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 10
- name: Prepare for app notarization
if: startsWith(matrix.os, 'macos')
# Import Apple API key for app notarization on macOS
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
env:
# macOS notarization API key
API_KEY_ID: ${{ secrets.api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}

View File

@ -1,16 +0,0 @@
branches:
only:
- master
- travis-debug
- /^v.*$/
os: osx
osx_image: xcode11.2
language: node_js
node_js:
- 12
script:
- |
npm run icon-gen &&
yarn release --win --linux --mac -c.snap.publish=github

View File

@ -1,152 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [2.4.0] - 2019-08-12
### Added
- Allow user to select output format to workaround certain issues like #173
- Show troubleshooting workarounds when cut fails
### Changed
- Upgrade ffmpeg to 2.2
### Fixed
- Fix vulnerabilities
## [2.3.0] - 2019-06-13
### Fixed
- upgrade file-type to fix mp4/mov detection #144
- Fix for TS with unknown streams #170
## [2.2.0] - 2019-05-06
### Changed
- Auto delete (trash) segments when auto merge
- Bump ffmpeg version
- Remove linux 32 bit build because static builds are no longer provided
### Fixed
- Security fixes for npm packages
- Allow custom output dir for merge and extract also
- Attempt to fix extract streams (ignore unknown streams)
## [2.1.0] - 2019-01-29
### Added
- Implement auto merge multiple segments
## [2.0.0] - 2019-01-28
### Added
- Implement multiple cutpoints
- Implement function for extracting all streams from a file
- Implement crude merge funtcion for files of the same codec
- Allow setting a time offset (video timecode)
### Changed
- Keyframe cut mode is now default
- Default include all streams
- Improve cut rendering graphics to make it easier to see what is cut start/end
- GUI improvments
## [1.14.0] - 2018-09-25
### Added
- Add "Delete source" button
## [1.13.0] - 2018-09-09
### Added
- Add exit menu item
### Changed
- Remember certain settings across file loads
- Some UI tweaks
- Transfer timestamps when convering to friendly format
- Allow for testing keyframe cut (see discussion in https://github.com/mifi/lossless-cut/pull/13)
- Update ffmpeg
### Fixed
- Fix a rare bug with duration
## [1.12.0] - 2018-06-05
### Added
- Button to include all streams
- Button to delete audio
### Changed
- Improve loading icon on white background
## [1.11.0] - 2018-05-21
### Added
- Allow pre-formatting or pre-encoding the video for more format support
### Changed
- Implement manual input field for cutting range
- Improve keyboard shortcut triggering
- Rearrange GUI a bit
## [1.10.0] - 2018-02-18
### Added
- Version check
### Changed
- Offset captured photo modified date to respect the frame offset, for better sorting
- Copy subtitles too
- Implement lossless rotation of videos (changing EXIF)
- Don't cut end if endpoint is the end of the video
- Remove extraneous dot in output file extension
## [1.9.0] - 2017-11-21
### Changed
- Change icons a bit
- Don't cut at start if start time is 0 (remove -ss 0)
- Show input dir in out path when file is loaded
- Show file title in window title
## [1.8.0] - 2017-09-14
### Changed
- Preserve input file modification time when cutting/screenshotting
- Make ffmpeg map metadata using `-map_metadata 0`
## [1.7.0] - 2017-08-17
### Added
- Progress when cutting (percent done)
- Ability to change frame capture image format (JPEG/PNG)
### Changed
- Don't allow cutting without a valid start/end
### Fixed
- Don't try to seek when no duration
- Also capture frame to custom output dir
- Fix running LosslessCut from strange directories
## [1.6.0] - 2017-03-27
### Fixed
- Be a bit smarter about aac/m4a files #28
- Make end time the end of video by default
- Prevent buttons from stealing focus
## [1.5.0] - 2017-02-11
### Fixed
- Add missing win32 metadata
- Fix capture frame output format to intended JPEG
## [1.4.0] - 2017-01-28
### Added
- Show help sheet by pressing H
### Fixed
- Support # in file path

View File

@ -1,27 +1,9 @@
## Release ## Release
### Release new version ### Release new version
```
# Commit changes
npm version ...
# Push with tag
# Wait for Travis
```
With travis deploy: - Commit changed
``` - `npm version ...`
Go to github releases and release the created draft - `git push && git push --tags`
``` - Wait for build and draft in Github actions
- Release draft at github
## Travis setup
https://github.com/travis-ci/travis-ci/issues/6132
https://github.com/bkimminich/juice-shop/blob/master/.travis.yml
https://stackoverflow.com/questions/12343452/how-to-publish-artifacts-in-travis-ci
https://docs.travis-ci.com/user/deployment/releases/
https://octokit.github.io/octokit.rb/Octokit/Client/Releases.html#create_release-instance_method
npm install -g pwmckenna/node-travis-encrypt
echo GITHUB_KEY | travis-encrypt -r mifi/lossless-cut

View File

@ -9,16 +9,16 @@
"start": "electron watch-build", "start": "electron watch-build",
"watch": "babel src -d watch-build --copy-files -w", "watch": "babel src -d watch-build --copy-files -w",
"icon-gen": "mkdir -p icon-build && svg2png src/icon.svg -o ./icon-build/app-512.png -w 512 -h 512", "icon-gen": "mkdir -p icon-build && svg2png src/icon.svg -o ./icon-build/app-512.png -w 512 -h 512",
"build-js": "rm -rf build && babel src -d build --copy-files", "build": "yarn icon-gen && rm -rf build && babel src -d build --copy-files",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"pack-mac": "electron-builder --mac", "pack-mac": "electron-builder --mac",
"prepack-mac": "yarn build-js", "prepack-mac": "yarn build",
"pack-win": "electron-builder --win", "pack-win": "electron-builder --win",
"prepack-win": "yarn build-js", "prepack-win": "yarn build",
"pack-linux": "electron-builder --linux", "pack-linux": "electron-builder --linux",
"prepack-linux": "yarn build-js", "prepack-linux": "yarn build",
"prerelease": "yarn build-js",
"release": "electron-builder", "release": "electron-builder",
"prerelease": "yarn build",
"gifify": "gifify -p 405:299 -r 5@3 Untitled.mov-00.00.00.971-00.00.19.780.mp4", "gifify": "gifify -p 405:299 -r 5@3 Untitled.mov-00.00.00.971-00.00.19.780.mp4",
"lint": "eslint --ext .jsx --ext .js ." "lint": "eslint --ext .jsx --ext .js ."
}, },
@ -40,7 +40,8 @@
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.16.0", "babel-preset-react": "^6.16.0",
"electron": "^7.0.1", "electron": "^7.0.1",
"electron-builder": "21", "electron-builder": "^22.3.2",
"electron-builder-notarize": "^1.1.2",
"eslint": "^5.6.1", "eslint": "^5.6.1",
"eslint-config-airbnb": "^17.1.0", "eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.14.0",
@ -89,7 +90,6 @@
] ]
}, },
"build": { "build": {
"appId": "no.mifi.losslesscut",
"files": [ "files": [
"build/**/*", "build/**/*",
"!node_modules/ffmpeg-static/bin/**/*", "!node_modules/ffmpeg-static/bin/**/*",
@ -98,7 +98,11 @@
"asar": { "asar": {
"smartUnpack": false "smartUnpack": false
}, },
"appId": "no.mifi.losslesscut",
"artifactName": "${productName}-${os}.${ext}",
"afterSign": "electron-builder-notarize",
"mac": { "mac": {
"hardenedRuntime": true,
"target": "dmg", "target": "dmg",
"extraResources": [ "extraResources": [
"node_modules/ffmpeg-static/bin/darwin/**", "node_modules/ffmpeg-static/bin/darwin/**",
@ -122,7 +126,6 @@
"icon": "icon-build/app-512.png", "icon": "icon-build/app-512.png",
"target": [ "target": [
"tar.bz2", "tar.bz2",
"snap",
"AppImage" "AppImage"
] ]
} }

782
yarn.lock

File diff suppressed because it is too large Load Diff