Skip to content

Update ReadMe.

Update ReadMe. #6

Workflow file for this run

name: Main
on:
push:
branches:
- '**' # All branch names including slashes.
- '!gh-pages' # Except for gh-pages.
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- '**' # All branch names including slashes.
- '!gh-pages' # Except for gh-pages.
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab.
env:
MUSHCLIENT_BINARIES: ${{ secrets.MUSHCLIENT_BINARIES }}
jobs:
build:
name: Build And Test
runs-on: windows-2022
defaults:
run:
shell: cmd
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for all branches and tags.
submodules: 'recursive' # All submodules.
- name: Download and Extract Binaries
shell: bash
run: |
curl --location --output "mushclient-mume-binaries.zip" "${MUSHCLIENT_BINARIES}"
echo Verifying checksum.
sha256sum -c "mushclient-mume-binaries.zip.sha256"
echo Extracting.
7z x -y -tzip "mushclient-mume-binaries.zip"
rm -f "mushclient-mume-binaries.zip"
- name: Merge Source Code
run: |
git archive --format tar --prefix "mushclient-mume/" HEAD | 7z x -y -ttar -si
if exist "pax_global_header" del /q /f "pax_global_header"
- name: Run Lua Tests
run: |
"mushclient-mume\test.bat"
deploy:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
name: Deploy Release
runs-on: windows-2022
permissions:
contents: write
defaults:
run:
shell: cmd
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for all branches and tags.
submodules: 'recursive' # All submodules.
- name: Get Project Info
id: project_info
run: |
NAME='MUSHclient MUME'
VERSION=${GITHUB_REF#refs/tags/v} # Everything after the v.
echo "name=${NAME}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Download and Extract Binaries
shell: bash
run: |
curl --location --output "mushclient-mume-binaries.zip" "${MUSHCLIENT_BINARIES}"
echo Verifying checksum.
sha256sum -c "mushclient-mume-binaries.zip.sha256"
echo Extracting.
7z x -y -tzip "mushclient-mume-binaries.zip"
rm -f "mushclient-mume-binaries.zip"
- name: Merge Source Code
run: |
git archive --format tar --prefix "mushclient-mume/" HEAD | 7z x -y -ttar -si
if exist "pax_global_header" del /q /f "pax_global_header"
- name: Create Bundle
shell: bash
env:
ZIP_FILE: mushclient-mume-v${{ steps.project_info.outputs.version }}
run: |
7z a -y -tzip "${ZIP_FILE}" "mushclient-mume"
sha256sum "${ZIP_FILE}" >"${ZIP_FILE}.sha256"
rm -rf "mushclient-mume"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by Actions.
name: ${{ steps.project_info.outputs.name }} Version ${{ steps.project_info.outputs.version }}
body: Auto-generated release.
draft: false
prerelease: false
fail_on_unmatched_files: true
files: |
mushclient-mume-v*.zip
mushclient-mume-v*.zip.sha256