Update Minecraft Wiki links to new domain (#4) #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
createrelease: | |
name: Create Release | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: release${{ github.run_number }} | |
release_name: Build ${{ github.run_number }} | |
body: | | |
Commit ${{ github.sha }} | |
${{ github.event.commits[0].message }} | |
draft: true | |
prerelease: false | |
- name: Output Release URL File | |
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt | |
- name: Save Release URL File for publish | |
uses: actions/upload-artifact@v1 | |
with: | |
name: release_url | |
path: release_url.txt | |
build: | |
name: Build packages | |
needs: createrelease | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
TARGET: macos | |
CMD_BUILD: pyinstaller --onefile --console --clean --hidden-import zipfile --collect-all nbt --collect-all frozendict --add-data "map_prepare:map_prepare" --icon icon.ico -n map-prepare-macos map_prepare/__main__.py | |
OUT_FILE_NAME: map-prepare-macos | |
ASSET_MIME: application/octet-stream | |
- os: windows-latest | |
TARGET: windows | |
CMD_BUILD: pyinstaller --onefile --console --clean --hidden-import zipfile --collect-all nbt --collect-all frozendict --add-data "map_prepare;map_prepare" --icon icon.ico -n map-prepare-windows map_prepare/__main__.py | |
OUT_FILE_NAME: map-prepare-windows.exe | |
ASSET_MIME: application/vnd.microsoft.portable-executable | |
- os: ubuntu-latest | |
TARGET: x86_64-linux-gnu | |
CMD_BUILD: pyinstaller --onefile --console --clean --hidden-import zipfile --collect-all nbt --collect-all frozendict --add-data "map_prepare:map_prepare" --icon icon.ico -n map-prepare-linux map_prepare/__main__.py | |
OUT_FILE_NAME: map-prepare-linux | |
ASSET_MIME: application/octet-stream | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Install pyinstaller | |
run: python -m pip install pyinstaller | |
- name: Build with pyinstaller for ${{ matrix.TARGET }} | |
run: ${{ matrix.CMD_BUILD }} | |
- name: Load Release URL File from release job | |
uses: actions/download-artifact@v1 | |
with: | |
name: release_url | |
- name: Get Release File Name & Upload URL | |
id: get_release_info | |
shell: bash | |
run: | | |
value=`cat release_url/release_url.txt` | |
echo ::set-output name=upload_url::$value | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release_info.outputs.upload_url }} | |
asset_path: ./dist/${{ matrix.OUT_FILE_NAME }} | |
asset_name: ${{ matrix.OUT_FILE_NAME }} | |
asset_content_type: ${{ matrix.ASSET_MIME }} |