Oberth #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release Assets | |
on: | |
release: | |
types: | |
- created | |
env: | |
AWS_S3_BUCKET: ksp-ckan | |
jobs: | |
sign-assets: | |
uses: ./.github/workflows/sign.yml | |
secrets: inherit | |
upload-nuget: | |
runs-on: ubuntu-latest | |
needs: | |
- sign-assets | |
steps: | |
- name: Download signed artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: signed | |
path: _build/signed | |
- name: Publish ckan.dll to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
if: env.NUGET_API_KEY | |
run: | | |
curl -o nuget.exe -L 'https://dist.nuget.org/win-x86-commandline/v5.6.0/nuget.exe' | |
mono nuget.exe push _build/signed/*.nupkg ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate | |
build-dmg: | |
runs-on: ubuntu-latest | |
needs: | |
- sign-assets | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install OSX build dependencies | |
run: sudo apt-get install -y libplist-utils xorriso | |
- name: Download signed artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: signed | |
path: _build/signed | |
- name: Put signed ckan.exe into repack path | |
run: | | |
mkdir -p _build/repack/Release | |
cp _build/signed/ckan.exe _build/repack/Release | |
- name: Build dmg | |
run: ./build osx --configuration=Release --exclusive | |
- name: Upload OSX release asset | |
run: gh release upload ${{ github.event.release.tag_name }} _build/osx/CKAN.dmg | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-deb: | |
runs-on: ubuntu-latest | |
needs: | |
- sign-assets | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- uses: actions/checkout@v4 | |
- name: Download signed artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: signed | |
path: _build/signed | |
- name: Put signed ckan.exe into repack path | |
run: | | |
mkdir -p _build/repack/Release | |
cp _build/signed/ckan.exe _build/repack/Release | |
- name: Set deb version | |
run: | | |
VERSION=$(echo "${{ github.event.release.tag_name }}" | tr -d "v") | |
echo "DEB_VERSION=${VERSION}.$(date +'%g%j')" >> $GITHUB_ENV | |
- name: Build deb | |
env: | |
CODENAME: stable | |
run: ./build deb --configuration=Release --exclusive | |
- name: Import GPG key | |
env: | |
DEBIAN_PRIVATE_KEY: ${{ secrets.DEBIAN_PRIVATE_KEY }} | |
run: | | |
echo "$DEBIAN_PRIVATE_KEY" | base64 --decode | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
if: ${{ env.DEBIAN_PRIVATE_KEY }} | |
- name: Sign deb release | |
env: | |
CODENAME: stable | |
DEBIAN_PRIVATE_KEY: ${{ secrets.DEBIAN_PRIVATE_KEY }} | |
run: ./build deb-sign --configuration=Release --exclusive | |
if: ${{ env.DEBIAN_PRIVATE_KEY }} | |
- name: Push deb to S3 | |
run: aws s3 sync _build/deb/apt-repo-root s3://${AWS_S3_BUCKET}/deb --follow-symlinks | |
- name: Push stable APT repo to S3 | |
run: aws s3 sync _build/deb/apt-repo-dist s3://${AWS_S3_BUCKET}/deb/dists/stable --follow-symlinks | |
- name: Upload deb release asset | |
run: gh release upload ${{ github.event.release.tag_name }} _build/deb/ckan_${DEB_VERSION}_all.deb | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-rpm: | |
runs-on: ubuntu-latest | |
needs: | |
- sign-assets | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- uses: actions/checkout@v4 | |
- name: Install rpm build dependencies | |
run: sudo apt-get install -y createrepo-c | |
- name: Download signed artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: signed | |
path: _build/signed | |
- name: Put signed ckan.exe into repack path | |
run: | | |
mkdir -p _build/repack/Release | |
cp _build/signed/ckan.exe _build/repack/Release | |
- name: Set rpm version | |
run: | | |
VERSION=$(echo "${{ github.event.release.tag_name }}" | tr -d v) | |
echo "RPM_VERSION=${VERSION}.$(date +'%g%j')" >> $GITHUB_ENV | |
- name: Build rpm | |
run: ./build rpm --configuration=Release --exclusive | |
- name: Import GPG key | |
env: | |
DEBIAN_PRIVATE_KEY: ${{ secrets.DEBIAN_PRIVATE_KEY }} | |
run: | | |
echo "$DEBIAN_PRIVATE_KEY" | base64 --decode | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
- name: Build stable RPM repo | |
env: | |
CODENAME: stable | |
DEBIAN_PRIVATE_KEY: ${{ secrets.DEBIAN_PRIVATE_KEY }} | |
run: ./build rpm-repo --configuration=Release --exclusive | |
if: ${{ env.DEBIAN_PRIVATE_KEY }} | |
- name: Push stable RPM repo to S3 | |
run: aws s3 sync _build/rpm/repo s3://${AWS_S3_BUCKET}/rpm/stable --follow-symlinks | |
- name: Upload RPM release asset | |
run: gh release upload ${{ github.event.release.tag_name }} _build/rpm/RPMS/noarch/ckan-${RPM_VERSION}-1.noarch.rpm | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
upload-binaries: | |
runs-on: ubuntu-latest | |
needs: | |
- sign-assets | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download signed artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: signed | |
path: _build/signed | |
- name: Upload ckan.exe and AutoUpdater.exe release assets | |
run: gh release upload ${{ github.event.release.tag_name }} _build/signed/ckan.exe _build/signed/AutoUpdater.exe | |
notify-discord: | |
needs: | |
- sign-assets | |
- build-dmg | |
- build-deb | |
- build-rpm | |
- upload-binaries | |
- upload-nuget | |
if: always() | |
uses: ./.github/workflows/notify.yml | |
with: | |
name: ${{ github.workflow }} | |
success: ${{ !contains(needs.*.result, 'failure') }} | |
secrets: inherit |