Skip to content

Commit

Permalink
chore(ci): update build and release workflows (#44)
Browse files Browse the repository at this point in the history
* chore(ci): update build and release workflow

* use cabal upload with token
  • Loading branch information
dalejo96 authored Mar 11, 2024
1 parent 90d6c23 commit 3103450
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# The present workflow was made based on the following references:
# - https://github.com/stackbuilders/hapistrano/blob/master/.github/workflows/build.yml
---
name: build

on: push
on:
push:
branches: [main]
pull_request:
workflow_call:

concurrency:
group: build-${{ github.ref }}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# The present workflow was made based on the following references:
# - https://github.com/tfausak/strive/blob/main/.github/workflows/ci.yaml
# - https://hackage.haskell.org/upload
---
name: Release

on:
Expand All @@ -12,8 +8,12 @@ concurrency:
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/build.yml

upload:
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write
issues: write
Expand Down Expand Up @@ -44,9 +44,9 @@ jobs:
node-version-file: .nvmrc
cache: yarn
- name: Install packages
command: yarn install --immutable
run: yarn install --immutable
- name: Publish package to Hackage
command: yarn release
run: yarn release
env:
HACKAGE_TOKEN: ${{ secrets.HACKAGE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -55,7 +55,6 @@ jobs:
- name: Upload documentation to Hackage
run: |
cabal upload --publish \
--username "${{ secrets.HACKAGE_USERNAME }}" \
--password "${{ secrets.HACKAGE_PASSWORD }}" \
--token "${{ secrets.HACKAGE_API_KEY }}"
--documentation \
dist-newstyle/*-docs.tar.gz

0 comments on commit 3103450

Please sign in to comment.