mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-04 05:37:14 +03:00
08a971f56e
it could use some more work, PRs have a different ref format and the "derive release tag" step needs to be updated to detect and do something intelligent with it, but I didn't want to right now.
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: pre-release
|
|
run-name: pre-release ${{github.ref_name}}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
on:
|
|
# run on each merge to `trunk`
|
|
workflow_run:
|
|
workflows: ["CI"]
|
|
branches: [trunk]
|
|
types:
|
|
- completed
|
|
|
|
# run manually
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
bundle-ucm:
|
|
name: build and bundle ucm
|
|
uses: ./.github/workflows/bundle-ucm.yaml
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
|
|
release:
|
|
name: create release
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
- bundle-ucm
|
|
|
|
steps:
|
|
- name: make download dir
|
|
run: mkdir /tmp/ucm
|
|
|
|
- name: "download artifacts"
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: /tmp/ucm
|
|
|
|
- name: derive release tag
|
|
run: echo "ref_name=$(echo ${{ github.ref_name }} | awk -F'/' '{print $NF}')" >> $GITHUB_ENV
|
|
|
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: ${{ env.ref_name }}-build
|
|
prerelease: true
|
|
title: Development Build (${{ env.ref_name }})
|
|
files: |
|
|
/tmp/ucm/**/ucm-*.tar.gz
|
|
/tmp/ucm/**/ucm-*.zip
|