Skip to content

Commit

Permalink
ci: Update workflows for breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
varungandhi-src committed Jul 9, 2024
1 parent e6e5306 commit 5391d2a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ jobs:
- name: ${{ format('πŸ“¦ Store binary ({0})', matrix.config) }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts
name: artifacts-binary-${{ matrix.platform }}-${{ matrix.config }}
path: ${{ env.outBinaryPath }}
retention-days: 2
- name: ${{ format('πŸ’Ž Build Gem(s) ({0})', matrix.config) }}
run: ./bazel build //gems/scip-ruby --config="${{ env.config }}"
- name: ${{ format('πŸ“¦ Store Gem(s) to GitHub ({0})', matrix.config) }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts
name: artifacts-gem-${{ matrix.platform }}-${{ matrix.config }}
path: bazel-bin/gems/scip-ruby/*.gem
retention-days: 2

Expand All @@ -110,5 +110,9 @@ jobs:
echo "Create release: tag=$TAG, title=$TITLE"
- name: 'πŸ“₯ Download all artifacts'
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
path: release-artifacts
merge-multiple: true
- name: 'πŸ“€ List artifacts for release'
run: ls ./*-release-artifacts/**
run: ls ./release-artifacts/**
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ jobs:
- name: ${{ format('πŸ“¦ Store binary ({0})', matrix.config) }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts
name: artifacts-binary-${{ matrix.platform }}-${{ matrix.config }}
path: ${{ env.outBinaryPath }}
- name: ${{ format('πŸ’Ž Build Gem(s) ({0})', matrix.config) }}
run: ./bazel build //gems/scip-ruby --config="${{ env.config }}"
- name: ${{ format('πŸ“¦ Store Gem(s) to GitHub ({0})', matrix.config) }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts
name: artifacts-gem-${{ matrix.platform }}-${{ matrix.config }}
path: bazel-bin/gems/scip-ruby/*.gem

create-release:
Expand All @@ -104,13 +104,17 @@ jobs:
# platforms here.
- name: 'πŸ“₯ Download all artifacts'
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
path: release-artifacts
merge-multiple: true
- name: 'πŸ“€ Upload artifacts for release'
run: gh release upload "${GITHUB_REF/refs\/tags\//}" ./*-release-artifacts/*
run: gh release upload "${GITHUB_REF/refs\/tags\//}" ./release-artifacts/*
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# There is also publish-manual.yml in case that is needed for some reason.
- name: 'Publish gems'
run: |
for g in ./*-release-artifacts/**.gem; do
for g in ./release-artifacts/**.gem; do
GEM_HOST_API_KEY=${{ secrets.RUBYGEMS_API_KEY }} gem push "$g"
done

0 comments on commit 5391d2a

Please sign in to comment.