SourceForge Release #5
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: SourceForge Release | |
on: | |
workflow_dispatch: | |
inputs: | |
mlton-version: | |
required: true | |
type: string | |
workflow_call: | |
inputs: | |
mlton-version: | |
required: true | |
type: string | |
jobs: | |
sourceforge-release: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: Download release assets | |
run: gh release download on-${{ inputs.mlton-version }}-release --dir assets --pattern '*' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup SSH | |
run: ./.github/scripts/setup_ssh.sh | |
env: | |
SSH_KEY_RSA: ${{ secrets.MLTON_WEBMASTER_SSH_KEY_RSA }} | |
SSH_KEY_ED25519: ${{ secrets.MLTON_WEBMASTER_SSH_KEY_ED25519 }} | |
SSH_CONFIG: ${{ secrets.MLTON_WEBMASTER_SSH_CONFIG }} | |
SSH_KNOWN_HOSTS: ${{ secrets.MLTON_WEBMASTER_SSH_KNOWN_HOSTS }} | |
- name: Create SourceForge release directory | |
run: sftp -b <(echo "-mkdir ${{ inputs.mlton-version }}") mlton-webmaster,[email protected]:/home/frs/project/mlton/mlton | |
- name: Upload release assets to SourceForge | |
run: rsync -azP --delete -e ssh assets/ mlton-webmaster,[email protected]:/home/frs/project/mlton/mlton/${{ inputs.mlton-version }}/ | |
- name: Upload release guide to SourceForge | |
run: | | |
tar xzf assets/mlton-${{ inputs.mlton-version }}.src.tgz | |
cd mlton-${{ inputs.mlton-version }}/doc/guide | |
mv localhost ${{ inputs.mlton-version }} | |
tar czf guide-${{ inputs.mlton-version }}.tgz ${{ inputs.mlton-version }} | |
rsync -azP --delete -e ssh ${{ inputs.mlton-version }} mlton-webmaster,[email protected]:/home/project-web/mlton/htdocs/guide/ | |
rsync -azP --delete -e ssh guide-${{ inputs.mlton-version }}.tgz mlton-webmaster,[email protected]:/home/project-web/mlton/htdocs/guide/ |