Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/actions/download/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Download artifact'
description: 'Download artifacts with normalized names'
inputs:
name:
required: true
type: string
path:
required: true
type: string

runs:
using: "composite"
steps:
- name: Normalise name
run: |
name=${{ inputs.name }}
echo "NAME=${name//\//_}" >> "$GITHUB_ENV"
shell: bash

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.NAME }}
path: ${{ inputs.path }}

33 changes: 33 additions & 0 deletions .github/actions/upload/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Upload artifact'
description: 'Upload artifacts with normalized names'
inputs:
if-no-files-found:
default: 'error'
type: string
name:
required: true
type: string
path:
required: true
type: string
retention-days:
default: 0
type: number

runs:
using: "composite"
steps:
- name: Normalise name
run: |
name=${{ inputs.name }}
echo "NAME=${name//\//_}" >> "$GITHUB_ENV"
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: ${{ inputs.if-no-files-found }}
retention-days: ${{ inputs.retention-days }}
name: ${{ env.NAME }}
path: ${{ inputs.path }}

47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and release

on:
push:
tags:
- 'v*'
- 'cabal-install-*'
pull_request:
types: [opened, synchronize, reopened, labeled]
# branches:
# - master
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

permissions:
pull-requests: read

jobs:
release-workflow:
uses: ./.github/workflows/reusable-release.yml
with:
branches: '["${{ github.ref }}"]'

release:
name: release
needs: [ "release-workflow" ]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
merge-multiple: true
path: ./out

- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
./out/*

Loading
Loading