Skip to content

Commit

Permalink
Switch to GitHub Actions for build and releases
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaSmith committed Mar 21, 2023
1 parent ff63a2a commit a433840
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 33 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Linux

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive

- name: Set version
id: set_version
run: echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- name: Build
run: make
56 changes: 56 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Windows

on: [push, pull_request]

env:
PROJECT_NAME: cdecrypt
FRIENDLY_NAME: CDecrypt

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive

- name: Set version
shell: bash
id: set_version
run: echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- name: Set major and minor
uses: actions-ecosystem/action-regex-match@v2
id: regex_match
with:
text: ${{ steps.set_version.outputs.version }}
regex: 'v(\d+)\.(\d+)'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Build
run: msbuild ${{ env.PROJECT_NAME }}.sln /m /p:Configuration=Release /p:Platform=x86 /p:AppVersion=${{ steps.set_version.outputs.version }} /p:AppMajor=${{ steps.regex_match.outputs.group1 }} /p:AppMinor=${{ steps.regex_match.outputs.group2 }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.PROJECT_NAME }}
path: ./x86/Release/*.exe

- name: Prepare release
if: startsWith(github.ref, 'refs/tags/')
run: |
7z a ${{ env.PROJECT_NAME }}.zip .\x86\Release\*.exe README.md LICENSE.txt
sha256sum ${{ env.PROJECT_NAME }}.zip
- name: Upload release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ env.FRIENDLY_NAME}} ${{ steps.set_version.outputs.version }}
files: ./*.zip
31 changes: 0 additions & 31 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion cdecrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ int main_utf8(int argc, char** argv)

if (argc < 2) {
printf("%s %s - Wii U NUS content file decrypter\n"
"Copyright (c) 2020-2022 VitaSmith, Copyright (c) 2013-2015 crediar\n"
"Copyright (c) 2020-2023 VitaSmith, Copyright (c) 2013-2015 crediar\n"
"Visit https://github.com/VitaSmith/cdecrypt for official source and downloads.\n\n"
"Usage: %s <file or directory>\n\n"
"This program is free software; you can redistribute it and/or modify it under\n"
Expand Down
2 changes: 1 addition & 1 deletion cdecrypt.rc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BEGIN
VALUE "FileDescription", APP_DESC
VALUE "FileVersion", TO_STRING(APP_MAJOR) "," TO_STRING(APP_MINOR) ",0,0"
VALUE "InternalName", APP_NAME
VALUE "LegalCopyright", "Copyright © 2020 VitaSmith, Copyright © 2013-2015 crediar"
VALUE "LegalCopyright", "Copyright © 2020-2023 VitaSmith, Copyright © 2013-2015 crediar"
VALUE "OriginalFilename", EXE_NAME
VALUE "ProductName", APP_NAME
VALUE "ProductVersion", TO_STRING(APP_MAJOR) "," TO_STRING(APP_MINOR) ",0,0"
Expand Down

0 comments on commit a433840

Please sign in to comment.