Skip to content

Create release.yml

Create release.yml #4

Workflow file for this run

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Build textract executable
run: swiftc -O main.swift -o textract
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: textract-${{steps.extract_branch.outputs.branch}}-${{ github.sha }}
# A file, directory or wildcard pattern that describes what to upload
path: textract