Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup-hs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Kaznacheev
ghcup-hs
Commits
01715fde
Verified
Commit
01715fde
authored
3 years ago
by
Julian Ospald
Browse files
Options
Downloads
Plain Diff
Merge branch 'github-actions'
parents
34ecb1a5
ab9b24e1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/release.yaml
+109
-0
109 additions, 0 deletions
.github/workflows/release.yaml
with
109 additions
and
0 deletions
.github/workflows/release.yaml
0 → 100644
+
109
−
0
View file @
01715fde
name
:
Create Release
on
:
push
:
tags
:
-
'
v*'
jobs
:
draft_release
:
name
:
Draft Release
runs-on
:
ubuntu-latest
outputs
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
steps
:
-
name
:
Create Release
id
:
create_release
uses
:
actions/create-release@v1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
tag_name
:
${{ github.ref }}
release_name
:
Release ${{ github.ref }}
body
:
|
Changes in this Release
- First Change
- Second Change
draft
:
true
prerelease
:
false
release-mac
:
name
:
Create Release
needs
:
draft_release
runs-on
:
${{ matrix.os }}
env
:
MACOSX_DEPLOYMENT_TARGET
:
10.13
strategy
:
matrix
:
os
:
-
macOS-10.15
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v2
-
uses
:
haskell/actions/setup@v1.2
with
:
ghc-version
:
8.10.4
cabal-version
:
3.4.0.0
-
name
:
create ~/.local/bin
run
:
mkdir -p "$HOME/.local/bin"
shell
:
bash
-
name
:
Add ~/.local/bin to PATH
run
:
echo "$HOME/.local/bin" >> $GITHUB_PATH
shell
:
bash
-
name
:
Update cabal cache
run
:
cabal update
shell
:
bash
-
name
:
Install cabal dependencies
run
:
cabal build --only-dependencies --constraint="zlib +bundled-c-zlib" --constraint="lzma +static" -ftui
shell
:
bash
-
name
:
Build
run
:
cabal build --constraint="zlib +bundled-c-zlib" --constraint="lzma +static" -ftui
shell
:
bash
-
name
:
Install
run
:
cp "$(cabal list-bin exe:ghcup)" ~/.local/bin/ghcup
shell
:
bash
-
name
:
Strip
run
:
strip ~/.local/bin/ghcup
shell
:
bash
-
name
:
Run tests
run
:
cabal test --constraint="zlib +bundled-c-zlib" --constraint="lzma +static" all
shell
:
bash
-
name
:
Install git
run
:
brew install git
-
name
:
set HOME
run
:
echo "HOME=$HOME" >> $GITHUB_ENV
shell
:
bash
-
name
:
Set ASSET_PATH
run
:
echo "ASSET_PATH=$HOME/.local/bin/ghcup" >> $GITHUB_ENV
shell
:
bash
-
name
:
Upload Release Asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ needs.draft_release.outputs.upload_url }}
asset_path
:
${{ env.ASSET_PATH }}
asset_name
:
ghcup-${{ matrix.os }}
asset_content_type
:
application/octet-stream
-
if
:
always()
uses
:
actions/upload-artifact@v2
with
:
name
:
plan.json
path
:
./dist-newstyle/cache/plan.json
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment