Skip to content

Commit

Permalink
ci: Update various github action versions (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 authored Aug 13, 2024
1 parent 9195857 commit 2554a09
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ runs:
using: composite
steps:
- uses: haskell-actions/setup@v2
with:
enable-stack: true

- name: Update dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/publish-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
shell: bash
run: echo "STACK_DIR=$(stack --no-terminal path --dist-dir --resolver=${{ inputs.resolver }})" >> $GITHUB_ENV

- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1
- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.2
name: 'Publish to Github pages'
with:
docs_path: ${{env.STACK_DIR}}/doc/html/launchdarkly-server-sdk-redis-hedis/
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/setup-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ inputs:
runs:
using: composite
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache .stack-work
with:
path: .stack-work
Expand All @@ -26,7 +26,7 @@ runs:
${{ runner.os }}-stack-work-
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ inputs.ghc-version != '' }}
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/update-cabal/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
ghc-version: ${{ inputs.ghc-version }}

- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cabal/packages
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
resolver: ["lts-16.31", "lts-18.28", "lts-19.33", "lts-20.11"]

Expand All @@ -37,16 +38,32 @@ jobs:
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
resolver: ["lts-16.31", "lts-18.28", "lts-19.33", "lts-20.11"]
include:
- resolver: lts-18.28
use-llvm: 'true'
- resolver: lts-19.33
use-llvm: 'true'
- resolver: lts-20.11
use-llvm: 'false'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # If you only need the current version keep this.

- name: Install os dependencies
run: brew install pcre
- name: Setup C_INCLUDE_PATH
run: |
brew install pcre
echo "C_INCLUDE_PATH=$(find /opt/homebrew/Cellar/pcre -name 'pcre.h' -exec dirname {} \;):$(xcrun --show-sdk-path)/usr/include/ffi" >> $GITHUB_ENV
- name: Add LLVM to path
if: ${{ matrix.use-llvm == 'true' }}
run: |
brew install llvm@14
echo "PATH=/opt/homebrew/opt/llvm@14/bin:$PATH" >> $GITHUB_ENV
- uses: ./.github/actions/setup-cache
- uses: ./.github/actions/ci
Expand Down Expand Up @@ -80,7 +97,7 @@ jobs:
with:
fail-on: warning

- uses: haskell-actions/run-fourmolu@v9
- uses: haskell-actions/run-fourmolu@v10
with:
version: "0.10.1.0"
pattern: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Build and Test
uses: ./.github/actions/ci

- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
name: 'Get Hackage token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ jobs:
- 6379:6379

steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main

- uses: actions/checkout@v4
with:
Expand All @@ -43,30 +39,30 @@ jobs:
#
# These remaining steps are ONLY run if a release was actually created
#
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
name: 'Get Hackage token'
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/hackage/password = HACKAGE_TOKEN'

- uses: ./.github/actions/setup-cache
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/ci
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/build-docs
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/publish
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
token: ${{ env.HACKAGE_TOKEN }}
dry_run: 'false'

- uses: ./.github/actions/publish-docs
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
# If publishing somewhere else, then get the token from SSM. If you need both github,
# and another token, then add more tokens to the composite action.
Expand Down

0 comments on commit 2554a09

Please sign in to comment.