github actions: Create install bundle workflow #18
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: Bundle as μpkg package | |
on: | |
push: | |
branches: ['*'] | |
tags: ['!v*'] | |
workflow_call: {} | |
jobs: | |
bundle: | |
name: Create upkg.tar.gz | |
runs-on: ubuntu-latest | |
steps: | |
- id: program_version | |
uses: orbit-online/program-version@v1.0.0 | |
- uses: actions/checkout@v4 | |
with: | |
path: upkg | |
- name: Write version to upkg.json | |
run: | | |
upkgjson=$(cat upkg.json) | |
jq --arg version "${{ steps.program_version.outputs.version }}" '.version=$version' <<<"$upkgjson" >upkg.json | |
working-directory: upkg | |
- name: Install dependencies | |
uses: ./upkg/.github/actions/install-dependencies | |
with: | |
working-directory: upkg | |
- name: Create upkg.tar.gz | |
run: tar -czC upkg -f upkg.tar.gz .upkg bin lib LICENSE README.md upkg.json upkg.schema.json | |
- name: Upload upkg.tar.gz | |
uses: actions/upload-artifact@v4 | |
with: | |
name: upkg.tar.gz | |
path: upkg.tar.gz | |
retention-days: 1 |