Initial commit #1
Workflow file for this run
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 and release | |
# This workflow runs when any of the following occur: | |
# - A tag starting with "v" is created | |
on: | |
push: | |
tags: | |
- v* | |
# Used to run locally using https://github.com/nektos/act | |
env: | |
ACT: | |
jobs: | |
# This pushes the zip to GitHub Packages. | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
# | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up (act) | |
if: ${{ env.ACT }} | |
run: | | |
apt-get update | |
apt-get install zip make -y | |
# Builds dist/fh2_matt_bakers_texture_pack_<version>.zip | |
- name: Build package | |
run: make | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | |
path: ./dist/fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | |
if-no-files-found: error | |
# This creates a draft release. | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | |
- name: Publish release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release ${{ github.ref_name }} | |
generate_release_notes: true | |
files: fh2_matt_bakers_texture_pack_${{ github.ref_name }}.zip | |