Build ICU4C on Fedora Linux #25
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: Build ICU4C on Fedora Linux | |
on: | |
workflow_dispatch: | |
inputs: | |
foo: | |
description: 'Release tag' | |
type: string | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/${{ github.repository_owner }}/fedora-docker-gcr:latest | |
credentials: | |
username: ${{ secrets.DOCKER_CONTAINER_USER_NAME }} | |
password: ${{ secrets.DOCKER_CONTAINER_REGISTRY_TOKEN }} | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout and setup | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Build release ICU4C | |
run: | | |
pushd icu4c/source | |
./runConfigureICU Linux/gcc | |
# TODO: make check to make sure that what we publish works | |
make DESTDIR=/tmp/icu releaseDist | |
popd | |
# Get the Fedora version in VERSION_ID | |
source /etc/os-release | |
# Get the ICU version in artifact_version | |
source icu4j/releases_tools/shared.sh | |
# Note that here we package the `icu` folder in `/tmp`, from the previous step, | |
# because `-C /tmp` changes the folder | |
tar -C /tmp -czf icu4c-${artifact_version}-Fedora_Linux${VERSION_ID}-x64.tgz icu | |
tar -C /tmp -czf $GITHUB_WORKSPACE/icu4c-${artifact_version}-Fedora_Linux${VERSION_ID}-x64_1.tgz icu | |
tar -C /tmp -czf ${{ github.workspace }}/icu4c-${artifact_version}-Fedora_Linux${VERSION_ID}-x64_2.tgz icu | |
ls -al | |
# TODO: add them to the GitHub "Release" page automatically (on condition) | |
- name: Upload build results | |
uses: actions/[email protected] | |
with: | |
name: fedora-binaries | |
path: ${{ github.workspace }}/icu4c-*.tgz | |
retention-days: 3 # TBD if we want to keep them longer | |
overwrite: true | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: release_76.1rc | |
release_name: Release release_76.1rc | |
draft: true | |
prerelease: false | |
# TODO: add them to the GitHub "Release" page automatically (on condition) | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, | |
# which include a `upload_url`. | |
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./icu4c-${artifact_version}-Fedora_Linux${VERSION_ID}-x64.tgz | |
asset_name: icu4c-${artifact_version}-Fedora_Linux${VERSION_ID}-x64.tgz | |
asset_content_type: application/tar+gzip |