mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-10 17:55:57 +01:00
Add release build on tagged commit
This commit is contained in:
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# This workflow will run every time a new release is created.
|
||||
# This workflow will run every time a tag starting with v is created.
|
||||
|
||||
name: Build and release
|
||||
on:
|
||||
@@ -8,12 +8,18 @@ on:
|
||||
jobs:
|
||||
portable-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Install mkvtoolnix
|
||||
run: sudo apt-get install -y mkvtoolnix
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Set timezone
|
||||
uses: szenius/set-timezone@v2.0
|
||||
@@ -43,12 +49,18 @@ jobs:
|
||||
|
||||
debian-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Install mkvtoolnix
|
||||
run: sudo apt-get install -y mkvtoolnix
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Set timezone
|
||||
uses: szenius/set-timezone@v2.0
|
||||
@@ -78,6 +90,10 @@ jobs:
|
||||
|
||||
windows-installer-build:
|
||||
runs-on: windows-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Install mkvtoolnix
|
||||
uses: crazy-max/ghaction-chocolatey@v3
|
||||
@@ -86,6 +102,8 @@ jobs:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Set timezone
|
||||
uses: szenius/set-timezone@v2.0
|
||||
|
||||
@@ -21,7 +21,10 @@ public class ProjectUtil implements CommandLine.IVersionProvider {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: add mkvmerge and mkvpropedit version
|
||||
public static String getProjectName() {
|
||||
return PROJECT_PROPERTIES.getProperty("project_name");
|
||||
}
|
||||
|
||||
public String[] getVersion() throws IOException {
|
||||
String mkvpropeeditVersion = getVersion(MkvToolNix.MKV_PROP_EDIT);
|
||||
String mkvmergeVersion = getVersion(MkvToolNix.MKV_MERGE);
|
||||
@@ -34,10 +37,6 @@ public class ProjectUtil implements CommandLine.IVersionProvider {
|
||||
};
|
||||
}
|
||||
|
||||
public static String getProjectName() {
|
||||
return PROJECT_PROPERTIES.getProperty("project_name");
|
||||
}
|
||||
|
||||
public static String getVersion(MkvToolNix app) throws IOException {
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(app.toString(), "--version");
|
||||
Process process = processBuilder.start();
|
||||
|
||||
Reference in New Issue
Block a user