Bump to 1.14.2 and pin version 1.9.6 of the web app. #60
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
# https://github.com/actions/create-release | |
# https://github.com/actions/upload-release-asset | |
name: Create a release from a tag | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Extract package version from tag reference | |
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
- name: Setup r2u | |
run: sudo bash scripts/setup-r2u.sh | |
- name: Install R packages | |
run: sudo bash scripts/install-dependencies-r2u.sh | |
- name: Create diagrams for vignettes | |
run: make diagrams | |
- name: Install TinyTeX | |
uses: r-lib/actions/setup-tinytex@v2 | |
env: | |
# install full prebuilt version | |
TINYTEX_INSTALLER: TinyTeX | |
- name: Download app | |
run: | | |
devtools::load_all() | |
installApp() | |
shell: Rscript {0} | |
- name: Build | |
run: R CMD build . | |
- name: Install | |
run: sudo R CMD INSTALL --no-multiarch --with-keep.source OmicNavigator_*.tar.gz | |
shell: sudo bash {0} | |
- name: Session information | |
run: | | |
library("OmicNavigator") | |
sessionInfo() | |
shell: Rscript {0} | |
- name: Build User's Guide vignette | |
run: | | |
setwd("vignettes") | |
utils::Sweave("OmicNavigatorUsersGuide.Rnw") | |
tools::texi2pdf("OmicNavigatorUsersGuide.tex") | |
file.copy("OmicNavigatorUsersGuide.pdf", "../OmicNavigatorUsersGuide_${{ env.version }}.pdf") | |
shell: Rscript {0} | |
- name: Build API vignette | |
run: | | |
setwd("vignettes") | |
utils::Sweave("OmicNavigatorAPI.Rnw") | |
tools::texi2pdf("OmicNavigatorAPI.tex") | |
file.copy("OmicNavigatorAPI.pdf", "../OmicNavigatorAPI_${{ env.version }}.pdf") | |
shell: Rscript {0} | |
- name: Release notes | |
run: | | |
releaseNotes <- utils::news(query = Version=="${{ env.version }}", package = "OmicNavigator") | |
writeLines(releaseNotes[["HTML"]], con = "RELEASE-NOTES.html") | |
shell: Rscript {0} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: OmicNavigator ${{ env.version }} | |
body_path: RELEASE-NOTES.html | |
draft: false | |
prerelease: false | |
- name: Upload package tarball as release asset | |
id: upload-release-asset-tarball | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # 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 | |
asset_path: ./OmicNavigator_${{ env.version }}.tar.gz | |
asset_name: OmicNavigator_${{ env.version }}.tar.gz | |
asset_content_type: application/gzip | |
- name: Upload User's Guide PDF as release asset | |
id: upload-release-asset-users-guide | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # 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 | |
asset_path: ./OmicNavigatorUsersGuide_${{ env.version }}.pdf | |
asset_name: OmicNavigatorUsersGuide_${{ env.version }}.pdf | |
asset_content_type: application/pdf | |
- name: Upload API PDF as release asset | |
id: upload-release-asset-api | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # 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 | |
asset_path: ./OmicNavigatorAPI_${{ env.version }}.pdf | |
asset_name: OmicNavigatorAPI_${{ env.version }}.pdf | |
asset_content_type: application/pdf | |
deploy-release: | |
needs: release | |
if: ${{ github.repository == 'abbvie-external/OmicNavigator' && github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy release dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
repository: abbvie-internal/OmicNavigatorCD | |
event-type: deploy-release | |
client-payload: '{ | |
"repository": "${{ github.repository }}", | |
"ref": "${{ github.ref }}", | |
"sha": "${{ github.sha }}", | |
"workflow": "${{ github.workflow }}", | |
"run_id": "${{ github.run_id }}", | |
"run_number": "${{ github.run_number }}" | |
}' |