Skip to content

Deploy

Deploy #3

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: cache
uses: actions/cache@v4
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-cache-
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
- name: build
run: mvn deploy -DskipTests=true -DuniqueVersion=false --settings settings.xml
- name: Gather dependencies
run: mvn -Dmdep.copyPom=true dependency:copy-dependencies && mvn dependency:list -DoutputFile=./deps.txt -Dsort=true -DincludeScope=compile -DincludeScope=runtime -DincludeTypes=jar
- name: Deploy dependencies
run: python ./deploy-dependencies.py
- name: Generate bootstrap
run: python ./bootstrap.py > bootstrap.json
- name: Generate bootstrap signature
run: 'echo "$SIGNING_PRIVATE_KEY" > private.pem && openssl dgst -sha256 -sign private.pem -out bootstrap.json.sha256 bootstrap.json'
env:
SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
- name: Upload bootstrap
run: 'aws s3 cp bootstrap.json "s3://cdn.rsprox.net/runelite/launcher/" && aws s3 cp bootstrap.json.sha256 "s3://cdn.rsprox.net/runelite/launcher/"'
- name: Invalidate CloudFront
run: |
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION --paths "/runelite/launcher/*"
env:
CLOUDFRONT_DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION }}