Skip to content

[drop] test s3 creds #2

[drop] test s3 creds

[drop] test s3 creds #2

Workflow file for this run

name: CI
on:
push:
branches:
- 'main'
- 'scratch/**'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
pull_request:
env:
MPN: 2024-03-01
jobs:
check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
r: 4.0.5
- os: ubuntu-20.04
r: 4.1.3
- os: ubuntu-latest
r: release
env:
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
extra-repositories: 'https://mpn.metworx.com/snapshots/stable/${{ env.MPN }}'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgdown
any::rcmdcheck
upgrade: 'TRUE'
- uses: r-lib/actions/check-r-package@v2
release:
name: Upload release
needs: check
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
extra-repositories: 'https://mpn.metworx.com/snapshots/stable/${{ env.MPN }}'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgpub
- name: Configure Git
shell: bash
run: |
git config --global user.email CI
git config --global user.name ci@metrumrg
- name: Tag
shell: bash
run: git tag -am 'release 0.4.0.9999' 0.4.0.9999
- name: Create output directory
shell: bash
run: echo "REPO_DIR=$(mktemp -d)" >>$GITHUB_ENV
- name: Create CRAN-like repo for release
run: pkgpub::create_tagged_repo("${{ env.REPO_DIR }}")
shell: Rscript {0}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::906087756158:role/github-actions-mpn-s3-publish
aws-region: us-east-1
- name: 'Publish package: 0.4.0.9999'
run: |
aws s3 sync --dryrun \
'${{ env.REPO_DIR }}/0.4.0.9999/' \
's3://mpn.metworx.dev/releases/${{ github.event.repository.name }}/0.4.0.9999/'
- name: 'Publish package: latest_tag'
run: |
aws s3 sync --dryrun \
'${{ env.REPO_DIR }}/0.4.0.9999/' \
's3://mpn.metworx.dev/releases/${{ github.event.repository.name }}/latest_tag_test/'