ci: test and release #6
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: Test & Release | |
on: | |
workflow_dispatch: | |
push: | |
env: | |
FIELD_ID: PVTF_lADOCOJGKs4AX9CyzgPUCoI | |
SELECT_FIELD_ID: PVTSSF_lADOCOJGKs4AX9CyzgPUCro | |
SELECT_OPTION_ID: 4b83566e | |
SELECT_COMPLEX_FIELD_ID: PVTSSF_lADOCOJGKs4AX9CyzgVbXGE | |
SELECT_COMPLEX_OPTION_ID: 0a479792 | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.TESTING_APP_ID }} | |
private-key: ${{ secrets.TESTING_APP_KEY }} | |
- name: Get field id | |
id: get-field-id | |
uses: ./ | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
project-number: 1 | |
project-owner: infinite-automations | |
field-name: Test Field | |
- name: Test Get field id | |
uses: nick-fields/assert-action@v2 | |
with: | |
expected: ${{ env.FIELD_ID }} | |
actual: ${{ steps.get-field-id.outputs.field-id }} | |
comparison: exact | |
- name: Get select option id | |
id: get-select-option-id | |
uses: ./ | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
project-number: 1 | |
project-owner: infinite-automations | |
field-name: Test select field | |
select-option-name: Option1 | |
- name: Test Get select option id | |
uses: nick-fields/assert-action@v2 | |
with: | |
expected: ${{ env.SELECT_OPTION_ID }} | |
actual: ${{ steps.get-select-option-id.outputs.select-option-id }} | |
comparison: exact | |
- name: Get Complex select option id | |
id: get-complex-select-option-id | |
uses: ./ | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
project-number: 1 | |
project-owner: infinite-automations | |
field-name: Test complex select field | |
select-option-name: Complex Option 1 | |
- name: Test Get complex select option id | |
uses: nick-fields/assert-action@v2 | |
with: | |
expected: ${{ env.SELECT_COMPLEX_OPTION_ID }} | |
actual: ${{ steps.get-complex-select-option-id.outputs.select-option-id }} | |
comparison: exact | |
release: | |
name: Release | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Semantic Release Plugins | |
run: | | |
npm install semantic-release-replace-plugin -D | |
npm install --save-dev semantic-release-major-tag | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
dry_run: ${{ github.event_name == 'pull_request' }} | |
ci: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |